CachedRowset Error Getting Date with Time

We are using CachedRowSet and while getting Date from Oracle, it is missing the Time. i.e. It is just returning the Date and not the time.
e.g. If the DB has 26-01-2005 10:00:00 it is returning just 26-01-2005 and not the time. It is all 0:0:0.
What should be done in this case? Is this a bug or what?

That's getTimestamp.Even tried that, but still getting time as 2005-02-09
00:00:00.0, and where as in the DB it is 2/9/2005
7:30:00 PMI simply cannot believe this to be true. But if indeed it is, then you have found a bug in Oracle's driver and would suggest you open a case with them to work out. One more thing to try though - what happens if you call getString instead? I don't know for sure if timestamp columns can be retrieved via getString, but if they can, what does it display? Also, are you sure you're getting the right row (correct query) and column versus what you're showing elsewhere (where you claim the DB shows 7:30:00 PM)? Are you getting the column via passing an integer, or a String column name, to the getTimestamp method? If an integer, maybe you're passing the wrong value (and therefor getting the wrong column value).

Similar Messages

  • Not able to use date with time in sql query

    Hi,
    select a.contract_number,b.start_date,b.end_date,b.price_negotiated,b.attribute_category,b.attribute1,a.sts_code,a.contract_number_modifier,b.cle_id,b.creation_date
    from OKC_K_HEADERS_ALL_B a,OKC_K_LINES_B b
    where a.id = b.dnz_chr_id
    and b.cle_id is not null
    and a.contract_number_modifier is not null
    and a.sts_code in ('ACTIVE','SIGNED','60 DAY HOLD','HOLD')
    and b.creation_date between to_date('21-10-2013 9:19:48','DD-MM-YYYY HH24:MI:SS')  and  sysdate;
    If I execute this query in toad it is giving me proper results.This query populates the results between the two date with time.
    But I am facing issue when I am using this query in the procedure. The procedure is as below.
    If I use the same query in the procedure I am getting wrong output.
    CREATE OR REPLACE procedure xx_prog_upd_annualized_amt(errbuf out varchar2, retcode out varchar2)
    as
    cursor c1 (l_date in varchar2)is
    select a.contract_number,b.start_date,b.end_date,b.price_negotiated,b.attribute_category,b.attribute1,a.sts_code,a.contract_number_modifier,b.cle_id
    from OKC_K_HEADERS_ALL_B a,OKC_K_LINES_B b
    where a.id = b.dnz_chr_id
    and b.cle_id is not null
    and a.contract_number_modifier is not null
    and a.sts_code in ('ACTIVE','SIGNED','60 DAY HOLD','HOLD')
    and b.creation_date between  to_date(l_date,'DD-MM-YYYY HH24:MI:SS')  and  sysdate;
    v_date varchar2(100);
    v_total_days number;
    v_annualized_amount number;
    begin
    begin
    select max(fcr.actual_start_date) into v_date
    from fnd_concurrent_programs_vl fcp
    ,fnd_concurrent_requests fcr
    where fcp.concurrent_program_id = fcr.concurrent_program_id
    and fcp.user_concurrent_program_name like 'Renewed Annualized Amount Updation';
    exception
    when others then
    fnd_file.put_line(fnd_file.log,'Invalid date');
    end;
    fnd_file.put_line(fnd_file.output,v_date);
    fnd_file.put_line(fnd_file.output,sysdate);
    fnd_file.put_line(fnd_file.output,'***************Start of Program***************');
    fnd_file.put_line(fnd_file.output,'***************Hi***************');
    For i in c1(v_date) loop
    SELECT
             1
           + 30 * TRUNC (MONTHS_BETWEEN ( TO_DATE (i.end_date, 'DD-MON-YYYY'),  TO_DATE (i.start_date, 'DD-MON-YYYY')))
           + LEAST (EXTRACT (DAY FROM TO_DATE (i.end_date, 'DD-MON-YYYY')), 30)
           - LEAST (EXTRACT (DAY FROM TO_DATE (i.start_date, 'DD-MON-YYYY')), 30)
           + CASE
                WHEN EXTRACT (DAY FROM TO_DATE (i.end_date, 'DD-MON-YYYY')) < EXTRACT (DAY FROM TO_DATE (i.start_date, 'DD-MON-YYYY')) THEN 30
                ELSE 0
             END
              daysbetween into v_total_days
      FROM dual;
      fnd_file.put_line(fnd_file.output,i.contract_number);
      fnd_file.put_line(fnd_file.output,v_total_days);
      If v_total_days < 360 then
      v_annualized_amount := (360*i.price_negotiated)/v_total_days;
      update OKC_K_LINES_B
      set attribute_category = 'Annualized Amount',attribute1 = v_annualized_amount
      where cle_id = i.cle_id;
       fnd_file.put_line(fnd_file.output,v_annualized_amount);
        fnd_file.put_line(fnd_file.output,i.cle_id);
        elsif v_total_days >= 360 then
      update OKC_K_LINES_B
      set attribute_category = 'Annualized Amount',attribute1 = i.price_negotiated
      where cle_id = i.cle_id;
      end if;
    end loop;
    commit;
    fnd_file.put_line(fnd_file.output,'***************End of Program***************');
    null;
    end;

    SureshM wrote:
    Hi Purvesh,
    Apologize for not giving the sufficient information.
    max(fcr.actual_start_date) = here I am getting date with time (for eg :9/4/2012 6:47:49 PM)
    Datatype for this column is date.
    This actual start date I am storing in varchar2 variable and then converting this value to date with time.
    My requirement is to pick the rows between the two timestamps which I am unable to do in the procedure.
    Regards
    Suresh
    YOu are losing the Time information while fetching the data into a VARCHAR2 variable. change the datatype of v_date to DATE and get rid of the TO_DATE logic in cursor and simply use v_date variable.
    Message was edited by: PurveshK misread.

  • Apex mobile Date-Picker (date with time) format mask error

    Hi together.
    I'm playing  a little bit with Apex mobile.
    I want to save a date with hours and minutes in the database. So i have an date field (type: date with time).
    On my phone i can select an date value with time, but when i want to save the value, i get an format error, that the format 'YYYY-MM-DD"T"HH24:MI:SS' is wrong.
    I can't change the format mask in the element properties, because it is everytime going back to the old value "YYYY-MM-DD"T"HH24:MI:SS", when i save it.

    Not a 100% related, but personally and from a usability point-of-view I really dislike the built-in datetimepicker and so far every client who has seen it has agreed with it. It pops the date and time down to the bottom, it only selects when you hit close, it just doesn't look appealing as the normal datepicker does and you expect more. Personally I've also gone the route Jari described several times, and it's probably still the cleanest and least error-prone option. Validating dates can be quite a pain, but the datepicker built-in validation does that fine, so if you can circumvent validating a free-text time field that helps). I've used some jQuery timepicker plugins aswell, and they're ok, but still don't solve the validation (even though there is some javascript validation you still need serverside validation). All I'm trying to say is that using select lists for hour-minutes is not such a bad idea in my opinion.

  • How can I  get System dates  with time scheduler using threads

    how can I get System dates with time scheduler using threads.is there any idea to update Date in my application along with system Date automatic updation...

    What the heck are you talking about and whatr has it to do with threads?
    Current time: System.currentTimeMillis. Date instances are not supposed to be updated.

  • Inserting Current Date with time stamp in oracle database

    Hi Experts,
                     I want to insert the current Date and time stamp in a field in the Oracle Database Table.
    I am able to insert date but i am not able to insert the date with time stamp. Any Suggestions??
    Thanks
    Naveen

    Naveen,
    Do you want to get current date (from sysdate) with a specific format or transform a value containing a date/time value to insert it in ORACLE ?
    Usually, you insert current datetimestamp in a date field using this :
    TO_DATE(sysdate,'dd/mm/yyyy hh:mi:ss')
    you may have to tweak the format pattern ('dd/mm....') according to your needs
    if you want to transform a date, use something like this:
    TO_DATE(your_date,your_format)
    but make sure your format is compliant with your date, ie
    TO_DATE('31/12/2008','MM/DD/YYYY') could raise error (litteral does not match) cuz ORACLE can't recognize 31 as a month pattern
    Chris

  • Error: 0271: Real Time Clock Error - Check Date and Time settings.

    Hello all,
    I have lenovo T430s laptop that is configured with Bitlocker encruptions and TPM PIN entry. I don't think that has anything to do with the error msg I am getting but here it is. Error: 0271: Real Time Clock Error - Check Date and Time settings.
    Press Esc to continue or F1 to enter setup. I am unable to get into BIOS or even the login screen for Windows 7.
    Any advice would be appreciated.

    Thanks to everyone for the help.  Just want to close this out.  I had a IBM/Lenovo technician here today and he replaced the CMOS battery.  Upon the change, the computer is fine being reconnected to the dock (the three times I tried it).  So it has been resolved with the battery.  Surprised by the incompatibility claim because I am not having issues now.  Wondering if it's just a USB 2.0 vs. 3.0 thing (and Lenovo trying to sell more peripherals, of course).
    Thanks!

  • How to include print date with time on SkillBuilders Schedule Plug In?

    Hi,
    Do you have an idea how to include and get the print date with time on the SkillBuilders Plug In? It shows me the date only, time not included. Have tried to put "HH24:MI", "HH24MI" or Tochar(HH24:MI)? No result??
    select p.fullname, sbip_schedule.start_date(e.event_schedule) start_date
    , sbip_schedule.end_date(e.event_schedule) end_date
    , sbip_schedule.duration_seconds(e.event_schedule) duration_seconds
    , sbip_schedule.calendar_summary(e.event_schedule) calendar_summary
    from app_events e
    Thanks!

    I forget to clarify I am looking for the answer is how to get the print of date with time, Start date with time and End Date with time.

  • How do I get date and time component from a DATE object?

    Hi All,
    I need to get date and time separately from a DATE object, does
    anyone know what function I should call? GetDate()? GetTime()?
    I need this in a SELECT statement.
    Thanks in advance and looking forward to your early reply.
    Regards.
    Gladywin
    30/11/2001

    Hello,
    See following SQL.
    select to_char(sysdate,'dd/mm/rrrr') today_date,
    to_char(sysdate,'hh24:mi') now_time
    from dual
    Adi

  • Get date AND time to show in the menu bar

    What is that technique to get date AND time to show in the menu bar please?

    Install iStat Menu
    System Preferences -> iStat Menus -> Date & Time
    \[X] Show Date & Time
    Format .... \[Edit]
    (*) Custom (drag tokens to build a custom format)
    Drag a light blue token into the edit line below the token selections. If you want a space a colon a dash, etc... just type that character(s) before after draging a token into place.
    I created: 9:35 PM Sat 1-Aug-2009
    You can create anything you like in any order you like.
    The other alternative (if you happen to be a fan of the Unix strftime() function) would be to use the % formatting characters in the Expert time format expression box. Use the Terminal "man strftime" to find out all the available % formatting codes.
    But I think the Custom Drag & Drop section is the easiest to use.
    However, if this doesn't work for you, then I guess it is just a case of "Your Mileage May Vary".

  • How to validate a date with time

    Hi All,
    How can I validate date with time?
    Here is my code:
    var tempDate:Date = new Date();
    if (tempDate < '09/18/2012 7:30:00 AM'){
         doSomething
    Thanks in advanced

    I think i got it to work.
    var tempDate:Date = new Date();
    var oldDate:Date = new Date('09/18/2012 7:30:00 AM');
    if ( Number(tempDate) < Number(oldDate) ){
         doSomething
    Best,

  • Best way to Pass a Date with Time to a Page

    Has anyone come up with a simple and reliable way to pass a Date with Time "06/13/1992 10:50 PM" to a page.

    Hi Scott:
    On Page 1:
    Summary Report
    LINK  Window   Item Count      Start Date                   End Date
      X       1            7         8/2/2007 03:15:20   8/2/2007 03:18:22
      X       2          12         8/2/2007 04:01:01   8/2/2007 04:07:42When the LINK is clicked
    On Page 2:
    [:P2_S_DATE] 8/2/2007 03:15:20 [:P2_E_DATE] 8/2/2007 03:18:23 [:P2_GO]
    Detail Report
    Window   Item Number      Item Date
        1                1                8/2/2007 03:15:24
        1                2                8/2/2007 03:17:04
       ...              ...                        ...I then need to allow the users to adjust the dates and click the P2_GO and have it return the new result set.

  • Run time Errors GETWA_NOT_ASSIGNED Date and Time

    Hi Experts,
    Please help me to resolve this...
    While Executing the conversion program in EMIGALL, I come across the following  short Dump.
    """Runtime Errors GETWA_NOT_ASSIGNED
    Date and Time DD:MM:YYY xx:xx:xx
    Short text
    Field symbol has not yet been assigned.
    Any help will be appreciated.""""""
    Thanks and Regards
    Vipin KV

    Hello,
    Can you please provide some more details from the dump?
    Regards
    Olivia

  • Retrieve date with time

    my given query return only date but i need date with time. my datatype is date format so i cant use the to_char function in my procedure bcz returning should be date format....
    select to_date(sysdate, 'dd-mon-yyyy hh24:mi:ss') from dual;

    SANCHIT GUPTA  wrote:
    my given query return only date but i need date with time. my datatype is date format so i cant use the to_char function in my procedure bcz returning should be date format....
    select to_date(sysdate, 'dd-mon-yyyy hh24:mi:ss') from dual;It is absolutely pointless (and often dangerous) to feed a DATE datatype to to_date. to_date is expecting character string, so feeding it a date just causes a double implicit conversion.
    DATE type always include time, whether it is displayed or not.
    Where are you using the value after it is returned? I think you are confusing data value with data presentation.
    See http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • Error during date calculation: Time entered not numerical

    Hi All,
    We are using SAP MI 7.0 SP18 Server and Client
    xMAM 3.0 SR06
    Now when we create a Notification using the link  Notification Management of type PV and SAVE.
    When Synchronized, it is completed but backend no notification is trigerring and when checked in Error Logs
    the following message is shown Error during date calculation: Time entered not numerical
    Kindly Suggest
    Regards,
    Kiran Joshua

    Hi All,
    I got to know how to edit the entries from merep_mon : Thanks to Chinna.
    But unfortunately that did not solve my problem
    I had to debug the function module of the respective SyncBO and found that the Profile type was not maintained in the backend.
    Infact the error "Error during date calculation: Time entered not numerical" was misleading.
    Anyways upon customising the Profile for the PJ and PV type Notifications that solved my issue.
    Regards,
    Kiran Joshua

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • How to create a text object at runtime?

    Hi, I am using crystal reports for visual studio 2010 and using c# to programming. I need to create  a text object in a specific section like section 2. and also I need to control the text object's position and text. I tried to move a object like: re

  • Can't View Photos Received By E-mail

    I have an Iphone 4. For some unknown reason, I have recently not been able to view photos that I receive via e-mail. Photos just appear with a question mark in a little box. Any idea's? Thanks

  • XML rendering in IE and Netscape

    Hi all, I have a simple servlet that streams xml data to the browser. When I view the page in IE it is formatted in the DHTML tree structure but with Netscape 7 it is messed up. However when I open an xml document directly in Netscape, it works! My J

  • Cant find and uninstall

    I tried to download free trial but there is an window apperas ,,A conflicting or prerelease version of Adobe Photoshop Cs6 exit on this computer.The confliction version must be removed befor installing from curent media.,, I tried to search that exis

  • Scanner Recognition Problems

    I don't see any problems like mine posted, so I hope someone can help. I'm an artist (stop laughing) who's had this problem the past month. In a nutshell. My scanner (HP 3570c) ceased to work after a recent move. I got a window saying the computer co