Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Posts
    58

    Post Unanswered: Random dates don't convert properly

    I have a table with a date field, and I do a simple sort and here are the results:
    CANCEL_DT
    ---------
    24-SEP-07
    23-JUN-04
    25-JUN-04
    30-JUN-04
    01-JUL-04
    02-JUL-04

    For some reason 24-SEP-07 always comes up first. When I convert it to a 4 digit year it returns 0407. Whereas other dates, even dates in 2007, return the correct 4 digit year (2007).
    Any idea why the year is not being converted correctly for this value?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    It is being converted correctly; unfortunately that is the value that someone stored there. Your data needs cleaning up.

  3. #3
    Join Date
    Feb 2002
    Posts
    58

    Post

    Yea you are right, it seems the year for that date in that record was entered in as 407 instead of 2007.

    This is what happens when you use other peoples data

  4. #4
    Join Date
    Jan 2003
    Location
    China
    Posts
    38
    There is no problem.The value of that field is 09-24-0407(mm-dd-yyyy) indeed.
    Last edited by 884813; 07-07-04 at 12:01.
    Fan Yi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •