Timestamp and dates prior to 1901

Hi,
I'm using Weblogic 7.0, CMP 2.0 and Oracle 8.1.7 as client/server.
There are a table in Oracle in which one of the primary keys is a DATE column.
That column can include dates/hours prior to 1901.
But when I use a CMP with java.sql.Timestamp class for mapping that column, I
come across a problem.
I cannot perform a findByPrimaryKey of records with that data prior to 1901, because
it never finds them.
If they are not prior to 1901, it works perfectly. WHY? What should I do with
dates prior to that date? Any trick?
Thanks in advance

I have something SIMILAR...
in iCal, some birthdays (all entered in address book) show up as all-day events and some show up as 24 hour events (start/end time). I honestly don't know why any would be different. I noticed it was with a couple of old timers (born in 1925 and displayed as a 24 hour event) and changed to 1950 and then they changed to an all day event which is correct. I then changed them back to 1925 and they stayed an all day event. I somehow think this could be related to what you are seeing, but am not sure.
Marlan

Similar Messages

  • Analytic View join issue between TIMESTAMP and DATE formats

    I have a fact table in my data foundation that has a TIMESTAMP date that i am trying to join with to my calendar table that has  a DATE format .  I am unable to query this view after creating it and it appears to be because of the data type differences.  Is there a way to convert when joining? i can not seem to find a way to do this

    Yes, you can use a generated always statement to create a join predicate and join against that in the view.
    Or you can join against the M_TIME_DIMENSION table in an attribute view to convert.
    Or you can create a calculated column and do a union.
    Depending on the requirements, one of these will be the best fit.

  • Timestamp and date

    Hi Gurus,
    Can anyone please help me :
    I have this date : *10/20/2010 10:12:09 PM* and i have to convert this date to *20101020201501*
    I am looking for a sql query for this conversion.
    Your help is Appreciated.
    Thanks

    You can hard code it, i.e.
    SELECT to_char( <<your date>>, 'YYYYMMDD' )  || '201501'
      FROM dualHowever that does not seem like a particularly sensible thing to do. If you don't understand the algorithm that someone has requested you use, the logical thing to do would appear to be to ask whoever wrote the requirements how they got from the input to the desired output. There is always a chance that they have made an error and that they really want the more sensible representation of the actual time. It seems very unlikely that they really want you to hard code a rather arbitrary time component.
    Justin

  • Select where timestamp between date1 and date 2

    try a lot of variations but still dont work
    this was my last shot, then i come here ask for help
    the field DATAHORAS is timestamp
    data1 and dat2 will come from a form
    To_Date(S.DATAHORAS, 'dd/mm/yyyy hh24:mi:ss')
    Between Cast(To_Date(:data1) As TimeStamp) And Cast(To_Date(:data2) As TimeStamp)
    thanks in advanced

    No. You don't need to. But....
    Edit: I was originally using a stupid example using DUAL which was completely misleading - sorry.
    Originally I used the example below to show that you don't have to do an explicit conversion.
    Things will still work comparing timestamps and dates.
    SQL> select systimestamp, sysdate, sysdate+1
      2  from dual
      3  where systimestamp between sysdate and sysdate + 1;
    SYSTIMESTAMP                        SYSDATE              SYSDATE+1
    09-FEB-10 13.58.35.712017 +00:00    09-FEB-2010 13:58:35 10-FEB-2010 13:58:35But then I added an explain plan to show that implicit conversions were going on:
    1  explain plan for
      2  select systimestamp, sysdate, sysdate+1
      3  from dual
      4* where systimestamp between sysdate and sysdate + 1
    SQL> /
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4192335797
    | Id  | Operation        | Name              | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |                   |     1 |     1   (0)| 00:00:01 |
    |*  1 |  FILTER          |                   |       |            |          |
    |   2 |   INDEX FULL SCAN| SYS_IOT_TOP_57625 |     1 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(SYS_EXTRACT_UTC(SYSTIMESTAMP(6))<=SYS_EXTRACT_UTC(SYSDATE@
                  !+1) AND SYS_EXTRACT_UTC(SYSTIMESTAMP(6))>=SYS_EXTRACT_UTC(SYSDATE@!))
    15 rows selected.
    SQL>However, this example is misleading because it's not the same implicit conversion you get with a proper table with a timestamp column:
    SQL> create table t1
      2  (col1 timestamp);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1   explain plan
      2   for
      3   select *
      4   from   t1
      5   where col1 between to_date('08-JAN-2010','DD-MON-YYYY')
      6*             and     to_date('09-JAN-2010','DD-MON-YYYY')
    SQL> /
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    13 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T1   |     1 |    13 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter("COL1">=TIMESTAMP' 2010-01-08 00:00:00' AND
                  "COL1"<=TIMESTAMP' 2010-01-09 00:00:00')
    Note
       - dynamic sampling used for this statement
    18 rows selected.
    SQL>Which is really what you want.
    It has an implicit conversion on the date parameters and no implicit conversion on the column which would prevent index usage if there were an index.
    Interestingly if you explicitly convert the dates to a timestamp, then you can get an extra filter predicate comparing the two parameters:
    SQL> explain plan
      2  for
      3  select *
      4  from   t1
      5  where col1 between cast(to_date('08-JAN-2010','DD-MON-YYYY') as timestamp)
      6             and     cast(to_date('09-JAN-2010','DD-MON-YYYY') as timestamp);
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3332582666
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |    13 |     2   (0)| 00:00:01 |
    |*  1 |  FILTER            |      |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |     1 |    13 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(CAST(TO_DATE(' 2010-01-08 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AS timestamp)<=CAST(TO_DATE(' 2010-01-09 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AS timestamp))
       2 - filter("COL1">=CAST(TO_DATE(' 2010-01-08 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AS timestamp) AND "COL1"<=CAST(TO_DATE(' 2010-01-09
                  00:00:00', 'syyyy-mm-dd hh24:mi:ss') AS timestamp))
    Note
    PLAN_TABLE_OUTPUT
       - dynamic sampling used for this statement
    23 rows selected.oracle version 11.1.0.6
    Sorry about the mistakes in previous version of this reply.
    Edited by: DomBrooks on Feb 9, 2010 2:25 PM

  • Timestamp vs date datatype

    I am transferring data from table A to table B. there is a column in table A with datatype 'timestamp' that has the fraction seconds in the data. However I am using data type 'date' in table B where I am transferring the timestamp data to. I can query the fraction saconds using the hh:mm:ss.ff in table A but when I use it in table B it shows nothing and errors out.
    i tried to use the CAST function to query the fraction seconds in table B but it shows zeroes.
    question is - is the fraction second being transferred to table B? what can I do to make sure fractions are being transferred from A to B
    any help will be appreciated

    Hi,
    question is - is the fraction second being transferred to table B? what can I do to make sure fractions are being transferred from A to BThat is the one of the difference between TIMESTAMP and DATE. TIMESTAMP holds the miliseconds also. To transfer fraction of second you need to convert B table's datatype to TIMESTAMP.
    Cheers,
    Avinash

  • TDMS - Writing a "Group" with data timestamp and values

    I'm trying to make building my trends from timewaveform max/mins easier.  Right now I have two TDMS groups: Measurement Data and Events.  Measurement data is the timewaveform data for all 32 channels.  The events group has two channels: Timestamps and Trend Data.  Is there a better way to organize these groups to build my trends easier.  Ideally I would want my data sent to my trend plot to have Measurement Data (Channel Name), Events (Timestamp), Events (Trend Data).
    What I want is similiar to what is contained in a waveform (to, dt, y) except I have a varying to and don't need the dt.
    This post may not make much sense, but I've found it much more difficult to build these trends then I think it needs to be.

    Hi LabViewer35242,
    I do not completely understand your question, would you provide some diagram, or code that you are working on?
    I would like to better understand this issue.  Here you can find a TDMS tutorial.
    Regards,
    steve.bm
    AE | NI

  • Is there any way to export or save my Lightroom 5 presets and keywords/tags to an external storage drive prior to a program and data wipe due to a corrupt registry? Thanks.

    Is there any way to export or save my Lightroom 5 presets and keywords/tags to an external storage drive prior to a program and data wipe due to a corrupt registry? Thanks.

    Look at these instructions for how to move your LR to a new computer and copy things to a backup device until your computer is reformatted and you reinstall LR:
    http://www.lightroomqueen.com/how-move-lightroom-to-new-computer/

  • Woes of the Z10, and now i want to use it as a backup phone for my contacts and data. Can I?

    Ok, this has been a real nightmare. I am an extensive user of BB since OS4. Wanted to try the new Z10, so I got myself a spanking new one. With my prior experience in switching devices, it would be a cinch. Transfer device over via blackberry desktop software, change the emails via BIS, and I'm all sorted out. 
    OMG dear blackberry. You made me jump through so many hoops I felt like a circus dog.
    Blacberry desktop doesn't work with the Z10. No one told me. I had to find out the hard way after not being able to detect the phone. wasted half an hour of my life. Downloaded Blackberry link. Transferred my contacts and everything over, couldn't be happier.
    Hurrah, thought the nightmare was done. It was just starting.
    Micro sim. Not everyone has a microsim cutter lying around. Great. Troop off to the shop. Figured after I get the sim cut, I could also transfer the emails via BIS server. So that's what I did. (oh by the way, having to buy a micro SD card was also a pain in the A but still acceptable). The BIS server detected the change in device so it disabled my emails. No problem. Until the technician told me at the store-sorry-BIS DOESNT WORK WITH Z10. Whaaaaat? Come on blackberry! Now its just normal emails, similar to that of iphone and samsung. Emails were your best feature. Ok, this I can stomach. What I cannot stomach is...blackberrry, you just killed your frequent traveller who needs international roaming. BIS emails and BBM was wonderful. I could get by travelling from country to country on 50mb a month unlimited. Apparently not anymore. I need a full fledged international roaming plan that will cost me an arm and a leg. This is insane. 
    Finally I had the Z10 working. I manually entered all my emails. ( i have 9 emails. Thank god they are all gmail based, especially for work, if not I would have ripped all my hair out). For the whole 2 hours, I looked at it and hated it. It was hard to use, I had to keep swiping up and to the right, sometimes it wouldn't swipe well, sometimes I couldn't tell if it was swiping or not. Neither did it help that Whatsapp hasn't even been sorted out on the Z10. Whatsapp is my life. My family's on it. My friends are on it. My suppliers and my customers are on it. Oh wait. Z10-well, you can download it from the appworld, but it doesn't install. Thinking it was a problem with the downloads, I kept at it..only to have the technician tell me, "sorry, Whatsapp not working on Z10, too bad"...anyway I made up my mind to go back to the Torch. So thinking it would be as simple as changing the hub ID on the Z10 and then reactivating the Torch. All will be well. Wrong. 
    I had to run to another tel shop to beg for a spare sim shell so I could stick the micro sim into it and have it back as a normal sim. Another 2 hours of my life later, I realise-changing the hub ID on the Z10 doesn't change anything. It doesn't mean you can just use the original hub Id and all systems are go on the first phone. Changing the hub ID means changing the original one. Argh. This was so frustrating especially when the BIS server refused to switch back to the old device. Ever clicked on detect device 200 times? Well that would be me. Eventually I figured it out. Change back to the old hub ID, security wipe the horrible thing, log in with the original hub ID and reset the device via BIS server. Finally, order is restored.
    Which leads me to my question. I am thinking of porting over my contact list and data to the Z10, and using it as another phone in another country. However I want to use a different Id from my Torch since it is considered a different device but with the same data. Will blackberry link allow me to do this, or will it only switch the data provided the hub ID is the same?
    Blackberry, hand over heart, I'll use the Torch till it dies ( I just changed out the nav pad cause it was completely worn out and would act wonky in sunlight- I call it the blackberry vampire version) and after that I'm off to another smart phone platform. You've made my life miserable. It was great while it lasted, but I'm going to be migrating to another platform eventually. Thanks for the memories.

    Hello,
    BlackBerry 10 has always been advertised as a revolutionary change from prior...not an evolution. And you have both now learned the hard way just how detailed that change is. As with so many things, the assumptions made from past experience with BB are not useful for this very significant change. Rather, research done prior to purchase is the most useful activity one can undertake.
    For BB10, BIS is not required. Indeed, on some carriers, having BIS on the account actually impedes some services for BB10. BB10 uses a full on-device ActiveSync client for email now. BIS-handled email is gone...as are "hosted" email accounts (though you can get 1-year of forwarding).
    Migrating of data from old to new involves many choices before beginning. For example, if you are not afraid of placing your Calendar and Contact data "into the cloud", the Z10 can excellently synchronize that against many different providers (many more than BIS ever could). Done correctly, one can attain full end-to-end OTA synchronization of Calendar/Contact data between Outlook desktop client (and perhaps others, though I've not tested), a Z10, a PlayBook, and more (for me, I've got 2 Outlook client instances, one Z10, one PB, and one Droid...all working beautifully OTA).
    Traveling is no more challenging than in the past...your specific device must be able to function on the networks upon which you wish to roam...this is no different from before (e.g., a GSM-only device simply cannot roam on a CDMA network). To compare specifics, I've found this useful:
    http://www.bbin.in/en/2013/03/03/4-types-blackberry-z10-models-fits-better/?utm_campaign=4-types-of-...
    There are many other differences...but please try to let go of what was before, for pretty much none of it applies anymore. BB10 is revolutionarily different from before.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Apex Collections and dates

    Apex Collections and Dates
    I made an earlier posting today on the forum titled “‘ORA-01861: literal does not match format string’ error after my hosting company upgraded to Apex 3.2.” The issue relates to Apex collections and dates. Prior to the hosting company upgrading Apex 3.2 from 3.1 all was working OK. It seemed a reasonable assumption that the issue relates to the upgrade to 3.2. Having tested the code against another Apex 3.2 installation I am satisfied that the issue is not with Apex 3.2. That said, I am still getting the issue on the hosting site.
    To demonstrate the issue to my hosting company and this forum, I put together a simple one page application that demonstrates the issue using the least amount of code.
    I created a page with an ‘On Load – Before header” process that sets up an Apex Collection with a single value of ’20-FEB-2009’ in the c001 element as follows:
    if apex_collection.collection_exists(p_collection_name=>'THEISSUE') then
    apex_collection.delete_collection(p_collection_name=>'THEISSUE');
    end if;
    apex_collection.create_collection(p_collection_name => 'THEISSUE');
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'THEISSUE',
    p_c001 => '20-FEB-2009');
    I added an SQL REPORT region to the page which uses the Apex Collection as follows:
    select to_date(c001,'DD-MON-YYYY') testdate
    from apex_collections
    where collection_name='THEISSUE'
    and to_date('20-FEB-2009','DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    When the page is run I get the ‘ORA-01861: literal does not match format string’ error.
    If I remove the following from the SQL Report Region:
    and to_date('20-FEB-2009','DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    and run the page, the date is displayed OK, i.e., c001 is converted to a date OK. This made me wonder whether it does not like the line to_date('20-FEB-2009','DD-MON-YYYY')? So I changed the where code for the report to :
    and to_date(c001,'DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    i.e., convert c001 to a date and compare it to itself. The rationale being that if the c001 converts to a date OK, then comparing c001 converted to a date with itself should not give an error. It did it gave the same error ‘ORA-01861’
    It would seem on my hosting site since the upgrade, that Apex and Oracle have problems with Apex Collection elements being converted to dates as part of the where clause.
    Now my understating of Oracle Apex collections in simple terms is that all Apex collections are held in a single Oracle table managed by a series of Apex functions. Given that all Apex collections are in the same table, could the issue be with the Oracle database when it is creating its execution plan for the query? Could Oracle be including the value of c001 from other collections (i.e., when c001 is not in a date format ) in the initial stages of its execution plan?
    I hope the above make sense and thanks in advance.
    Ian

    Scott,
    I believe I have found the answer the statistics on WWV_FLOW_COLLECTIONS$ and WWV_FLOW_COLLECTION_MEMBERS$. are out of date and Oracle is doing a full table scan instead of using the indices to select only the c001 columns that belong to the given collection_id. If I change my simple example to store the date value in c050 it works ok. (In all probability this will be the only collection on the hosted database to use c050).
    I have asked the hosting company to gather stats on all the apex tables.
    Thanks for your help
    Ian

  • Restrict GR date prior to PO creation date.

    Dear experts,
    The Present configuration allows GR date prior to PO creation date. The system allows users to post Goods receipt (MIGO), even if the GR date is prior to the PO creation date.
    How to restrict this? Is there a standard customization in MM or it requires ABAP programming?
    Please suggest me a solution as early as possible.
    Thanks in advance.
    Sathyaraj
    Edited by: Jürgen L. on Feb 9, 2012 5:33 PM

    HI
    requierd ABAp prograamming for same you have to use exit
    table will be EKKO help for PO creation date
    Logic will be while saving MIGO system will compare PO creation date from table EKKO and Posting date of MIGO
    Regards
    Kailas Ugale

  • HT201250 I recently replaced my 2009 Macbook Pro's hard drive.  I had the Apple store upgrade the OS to Mountain Lion while it was being repaired.  I want to restore all of my old files and data, if I restore from Time Machine, will it revert to the old O

    I recently had to replace my 2009 Macbook Pro's hard drive.  I had the apple store upgrade the OS to Mountain Lion while it was in being repaired.  I want to restore all of my old data and files.  If I perform a restore from Time Machine, with a date prior to having the hard drive replaced, will it revert back to the old OS?

    No, it won't revert to the prior OS X but you you may have third party apps installed that were compatible with Lion that may not be compatible with Mountain Lion.
    App Compatibility Table - RoaringApps - App compatibility and feature support for OS X & iOS
    After you restore from TM, check HD > Incompatible Software

  • In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp (EXIF date fields as

    I tryed to sort my pictures with buying Apps and following suggestion from apple, but without any success. In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp.

    Not a problem when using iPhoto on a Mac, which the transfer of photos is primarily based on - not manually managing photo storage as seems to be common with Windoze.
    The same should be available with a supported photo management app on a PC.
    http://support.apple.com/kb/HT4221

  • I am giving away a computer, what is the best way to wipe out data prior to depature

    i am giving away a computer, what is the best way to wipe out data prior to depature

    Did the Mac come with two grey disks when new? If so, use disk one to erase the drive using Disk Utility and then re-install the OS from the same disk. Once installed, quit and when the new owner boots they can set it up as a new out-of-the-box Mac when they boot it up. The grey disks need to be passed on with the computer.
    If you need detailed instructions on how to erase and re-install please post back.
    If the Mac came with Lion or Mountain Lion installed the above process can be done using the Recovery HD as since Lion no restore disks are supplied with the Mac.
    The terms of the licence state that a Mac should be sold/passed on with the OS installed that was on the machine when new (or words to that effect).

  • My iphone 3gs has started showing the wrong time  and date. All was fine until this afternoon when it changed.  My apps have the right time and date. However the world clock is wrong. I have to turn off the automatic time setting to get the right time.

    My iphone is showing the wrong time and date. All was well until sometime this afternoon when it changed...  to Nov 5 (2 days prior to today), and about 9 hours and some minutes before the actual time.  The world clock for my time zone shows the same wrong date and time. My calender shows the same wrong date and time.  The phone can not find my time zone any more.   The only fix I found was to turn off the automatic setting for time.  What is  happening? Ideas?

    just sorted mine went to
    settings-mail,contacts,calender-timezone support
    then turned it off then on tapped time zone and typed london
    this did sort mine

  • SAP IHC PAYMENT ORDER - posting date prior to Current posting date

    Hello folks,
    I have a general question about SAP-IHC module.
    While creating a manual internal payment order using IHC1IP transaction code, if I change the "Date Executed" date, the system allows to post the payment order in closed period(posting date prior to the current posting date(for the Bank area in F9B1), i.e. the payment items posted, contained in the IHC payment order, has an old posting date, which is prior to the current posting date of the Bank area - Is this normal?

    Dear,
    Check with settings in OLMR transaction.
    Invoice Block - Set Tolerance Limits [Transaction : OMR6]
    Here you need to add New entries with - Tolerance Key : LD and company code and set the limits. Please check the documentation which available read as below:
    LD: Blanket purchase order time limit exceeded
    The system determines the number of days by which the invoice is outside the planned time interval. If the posting date of the invoice is before the validity period, the system calculates the number of days between the posting date and the start of the validity period. If the posting date of the invoice is after the validity period, the system calculates the number of days between the posting date and the end of the validity period. The system compares the number of days with the with the absolute upper limit defined.
    Regards,
    Syed Hussain.

Maybe you are looking for