Comparing the time portion of datetime items on my form

Hi. I'm attempting to compare some datetime items on my form. On my form these items are formatted as HH12:MIPM even though they contain a datetime value. I believe my IF statement is failing because the date portion of the datetime values is different.
     if :cc_call_lists.NBT_LOCALDATETIME between :nbt_best_call_tm_start and :NBT_BEST_CALL_TM_END thenIs there a way form me to make this comparison using only the time portion of the datetime value?
So I need my IF statement to fire even when :cc_call_lists.NBT_LOCALDATETIME is 05/01/2013 02:00PM, and :nbt_best_call_tm_start is 05/15/2013 12:00PM and :NBT_BEST_CALL_TM_END is 05/15/2013 04:00PM.
Any help would be greatly appreciated. Thanks.

You have to eleminate the date-part for both items, maybe something like this:
-- check if first time is smaller second time
IF (:THEFIRSTDATE-TRUNC(:THEFIRSTDATE)) < (:THESECONDDATE-TRUNC(:THESECONDDATE)) THEN

Similar Messages

  • Datetime Items - Comparing only the Time portion

    Hi. I have two Datetime items on my form and I need to only compare just the time portion (hh:miPM) of each against each other. None of the other date information is important to me in the comparison. Is there a way to compare just the time portion of each in an IF condition similar to what I have below? Any help would be greatly appreciated.
    For example:
    IF :induction_info.mf_time <> :induction_info.cbms_mf_time THEN
    ....

    You could covert the date-portion to a number like
    IF TO_NUMBER(TO_CHAR(:induction_info.mf_time, 'HH24MISS'))!=TO_NUMBER(TO_CHAR(:induction_info.cbms_mf_time, 'HH24MISS')) THEN
    ..If you just want to check for "unequal", you could even leave the TO_NUMBER-part

  • How to fix the time to refresh page items on Page load

    Hi all,
    When my pages load, some page items hidden are shown and when page load they are hidden again. Is there any way to keep it hidden without this time to refresh?
    Thanks
    Bsalvador

    bsalvador wrote:
    fac586,
    I tryed with:
    #P32_DATA_FINAL, label[for="#P32_DATA_FINAL"] {  
      display: none;  
    And only Page item was hidden. Label is still showing...could you help me?
    Thanks
    bsalvador
    Sorry, the "#" shouldn't appear in the attribute selector. There's probably a theme CSS rule with a higher specificity on the labels, so add an !important directive to the rule:
    #P32_DATA_FINAL, label[for="P32_DATA_FINAL"] {  
      display: none !important;  
    Always state which theme and template(s) you are using in a question about visual formatting or layout. Theme HTML/CSS is not always—historically never—consistent, so we need to know this information in order to determine which selectors to use.

  • How can I set the time to remove trash items?

    My trash folder used to empty automatically after a week or so but it no longer empties automatically. Can anyone help me? Thanks.

    Firefox does not have a trash folder, and if you mean the one for the operating system, Firefox cannot control that, and it does not empty automatically either. Do you use webmail? Maybe there is a setting on the web page for emptying trash automatically.

  • How can change the Prompt of a text item in a form?

    Dear Friends...
    I want to change the label/Prompt of a form ( Miscellaneous Receipt) in Inventory Module. Ie Current lable/Prompt is REFERENCE, i want to change it into BOE. Pls advice me ........
    Regards
    Mary

    To make the change permanent you need to use the same Folders submenu and select either Save ... or Save As.... I would recommend the latter and give the folder your own custom name as this then differentiates any changes from the seeded folders / other locations who might also be using this folder etc.
    Thereafter, either your users will have to select the folder or (better) you can use the Administer Folders option in SysAdmin to default the folder to a particular responsibility or responsibilities.
    Regards,
    Jon

  • Can you help me get the time format to match XML dateTime?

    XML has a dateTime format which looks like this:
    2002-10-10T12:00:00-05:00
    and Im using XMLElement() functions in some queries to produce an xml document however it truncates the time portions of the data stored so it's just MM/DD/YYYY.
    i would use a to_char function but I'm not sure what date format in Oracle to use to match the timezone portion at the end (-05:00) and how to get it to accept that 'T' in there as a separator as defined in the XML Schema spec:
    http://www.w3.org/TR/xmlschema-2/
    Does anyone know?

    Hi,
    trant wrote:
    XML has a dateTime format which looks like this:
    2002-10-10T12:00:00-05:00
    and Im using XMLElement() functions in some queries to produce an xml document however it truncates the time portions of the data stored so it's just MM/DD/YYYY.
    i would use a to_char function but I'm not sure what date format in Oracle to use to match the timezone portion at the end (-05:00) and how to get it to accept that 'T' in there as a separator as defined in the XML Schema spec:
    http://www.w3.org/TR/xmlschema-2/
    Does anyone know?Try something like
    SELECT     TO_CHAR ( SYSTIMESTAMP
              , 'YYYY-MM-DD"T"HH24:MI:SSTZH:TZM'
    FROM     dual;Sample output:
    2011-07-25T15:50:12-04:00The TO_CHAR function is described in the SQL Language reference manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements004.htm#sthref396
    Look up "Format Models, Date" in the index.
    To put boilerplate (that is, fixed) text , such as the letter 'T', in the output, include it in double-quotes.
    TZH is the format specifier for Time Zone Hours, and TZM stands for Time Zone Minutes.

  • Not picking all open items at the time of out going payment(F-53)

    Dear Experts,
    I'm facing the issue at the time of out going payment(F-53)
    At the time of vendor line item display system is showing open items but at the time of out going payment(F-53)
    system is not picking the all open items it is picking only two items
    Pls help
    Regards
    Hari Prasad

    Hi Experts,
    Thnx for Quick response
    As per your instructions, I checked auto payment run here we have done successfully for vendor
    Open items shown in FBL1N but these open items not coming at the time of  out going payment
    I checked SPL GL indictors also
    Regards
    Hari Prasad

  • The time needed to reload index is longer in ICM compare to RFC.

    Hi All,
    Do you have the same experience in your company ??
    Since we upgrade our system to SPS 18 than we need to change our communication manager to ICM from RFC.
    Than we do a compare through different server with different SPS and communication manager.
    Server A => Uses SPS 13 and RFC
    Server B => Uses SPS 18 and ICM .
    When we finish doing index reloading, we compare the time to reload the index, and it's different.
    RFC is faster.
    My Questions are what the factor that can make ICM longer than RFC ? Is that any common way that we can do to tune up the ICM ?
    Thanks a lot and have a good day.
    Best regards,
    Daniel N.

    Hi Daniel,
    please check TA TREXADMIN -> click on TREX ABAP Customizing
    here you can check some ICM parameters and can do a net performance test.
    Have you already tried to trace this connection via SMICM?
    You can also do some checks and settings with the trex standalone tool; tab 'connectivity'
    Best Regards,
    Jens

  • Time portion not exported from datetime columns

    Hi,
    in version 1.0.0.15.57, the time portion of the date colums is not exported when using any export format (always 00:00:00). I can see the date and time correctly in the table data browser after altering the session :
    alter session set nls_date_format='YYYYMMDD HH24:MI:SS'
    But when exporting the content the time section is lost.
    Is this a known problem ?

    After changing the nls_date_format, I open the data tab for the table, right-click on the table name in the connections tab (table browser), and select export/CSV. This give export the value "12:00" for all time portion. BUT I tried to right-click on the table data tab instead and choose export/CSV... the time portion is now exported correctly!
    It is not the same result to export table content using the export menu in the data tab window than the menu in the connections tab.
    Could you try it ? thanks.
    Message was edited by:
    satch
    Message was edited by:
    satch

  • Time Picker defaults time to 7:00 when the time is deleted

    I have a Lightswitch 2013 desktop silverlight application with a datetime field (not required) but I only use the time portion of the field.  I have a screen with a Time Picker on it and when the user deletes the time the system puts 7:00 am in the
    field.  This only happens in the published application when I debug if I delete the time the time picker is left blank but when looking at the change event the field is changed to the current date with a time of 7:00 AM.  If the time was midnight
    I could at least do some validation and make the field null.  Any ideas why this is happening and how to fix, ideally make the field null but at least make the field midnight.
    Becky

    I need to clarify this bug, when you delete the time the time is immediately changed back to the original time it doesn't matter what time the original time was.  Also the record is not flagged as dirty which means the change event doesn't fire.
    As for the UTC we are on Pacific Standard time so there is an 8 hour difference.  I did some testing and if I the screen says 8:00 am the local time is 12:00 am which is correct, but I don't think it is related to UTC good catch though.
    I've tried the validation and the field can be null, the only way I can get it to change to null is to change the time to some specific value (say midnight) then set it to null in the change event.  This works just fine until someone really needs to
    set the time to midnight.
    Thanks for the idea's I really appreciate it.
    Becky

  • Removing the data portion

    Hi ,
    I have a varchar2 field that stores time :
    16:29:00
    08:30:00...
    i want to query this column but after converting it to date and getting only the time portion so i can make some comparisons , but when i issue this query the date part still shows :
    select TO_DATE(ACTION_TIME,'HH24:MI:SS')
    FROM V$EVENTLOGS;i also tried this select TO_DATE(to_char(ACTION_TIME,'HH24:MI:SS'),'HH24:MI:SS')
    FROM V$EVENTLOGS;but it gives:
    ERROR at line 1:
    ORA-01722: invalid number
    Thanks

    Hi,
    oais wrote:
    select TO_DATE(ACTION_TIME,'HH24:MI:SS')
    FROM V$EVENTLOGS;i also tried this select TO_DATE(to_char(ACTION_TIME,'HH24:MI:SS'),'HH24:MI:SS')
    FROM V$EVENTLOGS;but it gives:
    ERROR at line 1:
    ORA-01722: invalid numberPerhaps it really means that.
    If even one of the strings contains something other than a number (e.g. '??:00:00', you will get that error, and no other results.
    To see what rows are not in the correct format, use TRANSLATE.
    SELECT  action_time
    FROM     v$event_logs     -- as others have said, a confusing name
    WHERE     TRANSLATE ( action_time
                , '123456789'
                , '000000000'
                ) != '00:00:00'
    ;you'll get a different error message if the string contains a valid number that does not happen to be a valid hour, minute or second. You might as well check for those errors at the same time:
    SELECT  action_time
    FROM     v$event_logs     -- as others have said, a confusing name
    WHERE     TRANSLATE ( action_time
                , '123456789'
                , '000000000'
                ) != '00:00:00'
    OR     SUBSTR (action_time, 1, 2)     NOT BETWEEN '00' AND '23'
    OR     SUBSTR (action_time, 4, 2)     NOT BETWEEN '00' AND '59'
    OR     SUBSTR (action_time, 7, 2)     NOT BETWEEN '00' AND '59'
    ;You should correct (or remove) the invalid strings from the table, then add a CHECK constraint to make sure the data stays clean.
    Why are you converting the strings to a DATE?
    If you just need to display them, or compare them (e.g., find times between '08:00:00' and '18:00:00') it's better to leave them as strings.
    If you do convert them using TO_DATE, note what Justin said:
    An Oracle date always has a day component and a time component. If you convert the string '16:29:00' to a date, that automatically becomes today (i.e. 18 April 2009) at 16:29:00.I think Justin made a typo, though. If you don't give a day of the month in TO_DATE, it defaults to the 1st of the month, not the current day.
    That is
    TO_DATE ( '16:29:00'
            , 'HH24:MI:SS'
            )returns 01-Apr-2009 16:29:40 when run today (April 18) or any time during April 2009.

  • Problem in retreiving the time from the table

    I have stored time in varchar2 format but in forms in order to enable a button i have to compare the time,for that I have used to_char(sysdate,'HH24') as : is not working.How to retreive the time in its exact format/?

    Hi,
    When you compare the Date and Time Fields which of varchar Type, we will get undesirable results.
    Always, Trying Store date in DATE Type.
    As, you are using stroed in Character type,
    Just try something like this,
    SELECT TO_DATE ('23:00:00', 'HH24:MI:SS')
      FROM DUAL;Which displays the
    Date
    6/1/2012 11:00:00 PMThe better way is to convert your varchar2 type to date format and check against it.
    Thanks,
    Shankar

  • Currency Conversion at the time of Invoice Print Document Creation

    Hi,
    In our system for some accounts we receive payments in USD (foreign currency) and at the time of posting, the amounts are stored in both transaction currency and local currency (CAD).
    We have a scenario as follows:
    Payment is posted as a payment on account (sitting as open credits)
    At the time of invoicing, these items are picked up to be included in the bill
    Now while calculating the invoice amount, these payments are again converted into local currency by using the configured exchange rate (SAP NetWeaver>General settings>Currencies)
    For e.g.
    Document
    Amt in USD
    Amt in CAD at posting
    Amt in CAD at invoicing
    300000000
    200
    214
    220
    300000001
    144
    145
    159
    The print document calculates the invoice amount using (220+159) which is not in sync with what we see in FPL9 (214+145). It also causes the invoice to go out of balance as print workbench is picking up the amounts from the table.
    My understanding is that we should be able reconcile the invoice header amount with the account balance in FPL9. In such cases, depending on when the invoice is created (cancel/rebills etc) the amounts will always be out of sync as the exchange rate changes frequently.
    Is there a way this functionality can be controlled from the invoicing side? Or does the PWB code have to be modified to handle this situation.
    Thanks for your time.
    Regards,
    Prashant

    Did you read User Exits For Billing in online help ?
    Regards,
    Raymond

  • Database Polling Strategy: Time portion of Date/Time not propogated to BPEL

    Hi,
    I have a simple BPEL process that uses a last update date polling strategy using a helper table. The table I'm going against is a simple, three column table, as defined below:
    CREATE TABLE XXSI_TEST_PRODUCTS
    ID VARCHAR2 (32) NOT NULL,
    DESCRIPTION VARCHAR2 (32),
    LAST_UPDATED DATE
    The helper table is as follows:
    CREATE TABLE XXSI_PRODUCT_SEQUENCING
    TABLE_NAME VARCHAR2 (32),
    LAST_UPDATED DATE
    The issue I am having is when the adapter picks up the updated rows from the XXSI_TEST_PRODUCTS, that it picks up the date portion of the date datatype fine. (i.e., I can see the value in the audit flow of the BPEL console) However, the time portion of the datatype is always 00:00:00.
    Could anyone suggest what the issue is here?
    Thanks
    Aashish

    To add to this earlier note. I can get this to work with the olite database connection, but not Oracle (JDBC) thin driver. Should I be using the Type 2 OCI driver? If so, what should I use?

  • Change Time Portion in a Date

    Dear Experts,
    I want to change the time portion of a date in forms6i through pl/sql, but its not changing correctly. I have tried many options but failed
    existing value = 18-FEB-2011 09:32:30. I want to fix it as 18-FEB-2011 08:00:00 through a trigger, but
    it changes either date or sets time 00:00:00. By default it shows time as 12:00:00.
    I can change it manually but not through triggers.
    Please find me a solution
    Regards
    AK

    user832095 wrote:
    Dear Experts,
    I want to change the time portion of a date in forms6i through pl/sql, but its not changing correctly. I have tried many options but failed
    existing value = 18-FEB-2011 09:32:30. I want to fix it as 18-FEB-2011 08:00:00 through a trigger, but
    it changes either date or sets time 00:00:00. By default it shows time as 12:00:00.
    I can change it manually but not through triggers. Hello, AK
    Interesting to see you are trying to convert *09:32:30* to *08:00:00* without any logic ?
    It's your business.
    try this it's return charecter
    select TO_CHAR((TO_DATE('18-FEB-2011 09:32:30','DD-MON-RRRR HH:MI:SS')),'DD-MON-RRRR')||' '||TO_CHAR(TO_DATE('08:00:00','HH:MI:SS'),'HH:MI:SS')
    FROM DUALtry this. it's return date
    select to_date(TO_CHAR((TO_DATE('18-FEB-2011 09:32:30','DD-MON-RRRR HH:MI:SS')),'DD-MON-RRRR')||' '||TO_CHAR(TO_DATE('08:00:00','HH:MI:SS'),'HH:MI:SS'),'DD-MON-RRRR HH:MI:SS')
    FROM DUALHopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for