Home » Infrastructure » Unix » calculate time in seconds
calculate time in seconds [message #97668] Mon, 28 October 2002 03:32 Go to next message
Depa
Messages: 30
Registered: June 2002
Member
hai,

is there any utility or script as such to calculate the time in seconds.

ie. givendate - jan 1 1970 in seconds.

help needed.
Re: calculate time in seconds [message #97672 is a reply to message #97668] Wed, 30 October 2002 13:18 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
SELECT   (  TO_DATE ('30-Oct-2002 13:44:21', 'dd-Mon-yyyy hh24:mi:ss')
          - TO_DATE ('01-Jan-1970', 'dd-Mon-yyyy')
         ) * 24 * 60 * 60
  FROM DUAL;
 
1035985461
Previous Topic: Help for writing Unix Script for selecting oracle tables
Next Topic: GOOD MATERIALS FOR UNIX/LINUX CERTIFICATION
Goto Forum:
  


Current Time: Tue Apr 16 11:51:39 CDT 2024