DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Date Type Cover

  1. #1
    Join Date
    Nov 2001
    Location
    Beijing China
    Posts
    29

    Angry

    Dear all,

    I got a table of Online Registration Information to analyze, but the DateType is numerical, which I think it records how many seconds since 1970 Jan 1. How can I cover the Date type into 'YYYY-MM-DD'? Is there any funtion?

    Thanks in advance!!!

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    If your number realy means the seconds elapsed since 1970 Jan 1, then you can get the date from it by using:

    TO_DATE('1970-01-01','YYYY-MM-DD') + :my_var/(24*60*60)

    Here :my_var represents your number of elapsed seconds since 1970-01-01. The expression 24*60*60 is the number of seconds in one day.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Nov 2001
    Location
    Beijing China
    Posts
    29

    Thumbs up

    Thank you, Jmodic

    I checked it again, it is Millisecond since 1970 Jan 1.

    Thanks

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