convert Full date from minutes to normal date format 
Author Message
 convert Full date from minutes to normal date format

I do queries in a oracle database feeded by a software that code the
date in minutes (i guess). The actual number 922022853 should correspond
to this format : 14 th december 1999 00:46:44... Anybody know how to
convert this?


Sat, 01 Jun 2002 03:00:00 GMT  
 convert Full date from minutes to normal date format

These are usually an offset in minutes from a base date, typically "1 January 1970 00:00:00".  The number and the date you posted don't fit this rule but I assume they are just illustrative.

Example:

base = cdate("1 January 1970 00:00:00")
dt = cdate("14 December 1999 00:46:44")
diff = datediff("s",base,dt)
newdt = dateadd("s",diff,base)

msgbox base
msgbox dt
msgbox diff
msgbox newdt

--
Michael Harris

  I do queries in a oracle database feeded by a software that code the
  date in minutes (i guess). The actual number 922022853 should correspond
  to this format : 14 th december 1999 00:46:44... Anybody know how to
  convert this?



Sat, 01 Jun 2002 03:00:00 GMT  
 convert Full date from minutes to normal date format

Ooops..   an offset in seconds

--
Michael Harris

  These are usually an offset in minutes from a base date, typically "1 January 1970 00:00:00".  The number and the date you posted don't fit this rule but I assume they are just illustrative.

  Example:

  base = cdate("1 January 1970 00:00:00")
  dt = cdate("14 December 1999 00:46:44")
  diff = datediff("s",base,dt)
  newdt = dateadd("s",diff,base)

  msgbox base
  msgbox dt
  msgbox diff
  msgbox newdt

  --
  Michael Harris

    I do queries in a oracle database feeded by a software that code the
    date in minutes (i guess). The actual number 922022853 should correspond
    to this format : 14 th december 1999 00:46:44... Anybody know how to
    convert this?



Sat, 01 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. searching a routine to convert date number in normal format date

2. How to convert number format to date format

3. My datagrid cannot display full date and time (only date is shown)

4. Getting system date (date format and seperator) from JScript

5. Converting a Win32_NTLogEvent date to VB date

6. Converting Julian Date to Long Date

7. Code to Convert Medium Date to Short Date

8. Function to convert date() to Julian date

9. How to convert 4 byte date to 8 byte date

10. Convert date serial to a date data type

11. How to convert DATE to JULIAN DATE?

12. How to convert DATE to JULIAN DATE?

 

 
Powered by phpBB® Forum Software