Date Fuctions
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Date Fuctions

  1. #1
    Join Date
    Mar 2002
    Posts
    25
    Hi

    I have a table with a varchar column, and in that column there are date values in the format 'yyyy/mm/dd hi24mm'.
    I am trying to run a query to co convert this into a date coulumn (Just to run different date functions and other functions like MAX) and I get an " Invalid number Error".

    Does anyone have any Ideas ?

    Pls Help

    Thanx.

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Hi,
    the format is probably 'yyyy/mm/dd hh24mm' isn't it?

    I suppose some of the values in the varchar column don't correspond to the format you expect.
    Try to find it, perhaps it has different length.
    Ales

  3. #3
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818
    Also ...
    The minutes should be mi - not mm (month!).

  4. #4
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Originally posted by JMac
    The minutes should be mi - not mm (month!).
    Yes! It's friday, I'm almost blind ...
    This could be the problem, If you have mm there every minute higher than 12 causes the error.

  5. #5
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,591

    SQL> select to_date('1999/12/25 10:25','yyyy/mm/dd hh24:mi') tarry_tst from dual;

    TARRY_TST
    ---------
    25-DEC-99


    CHEERS
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

Posting Permissions

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



Click Here to Expand Forum to Full Width