Unix Epoch Time

Unix Epoch Time

Post by George Durz » Fri, 24 Oct 2003 22:19:10



I wanted to check if anyone had written a UDF or some SQL to convert Unix
Epoch time to "human" time before I went ahead and tried.

Thanks!

 
 
 

Unix Epoch Time

Post by Steve Kas » Fri, 24 Oct 2003 22:47:33


George,

  It's a simple addition of seconds to the Unix epoch base
moment:



select

  dateadd(second,1066012345,'19700101') as HumanTime

If you need local time, add your offset from Universal
Coordinated Time.

-- Steve Kass
-- Drew University
-- Ref: 4207C042-C4BA-4EC5-8161-B27ADEB662AD


>I wanted to check if anyone had written a UDF or some SQL to convert Unix
>Epoch time to "human" time before I went ahead and tried.

>Thanks!


 
 
 

Unix Epoch Time

Post by George Durz » Fri, 24 Oct 2003 22:52:14


Steve,
Where did you come up with 1066012345?
Was it arbitrary?


> George,

>   It's a simple addition of seconds to the Unix epoch base
> moment:



> select

>   dateadd(second,1066012345,'19700101') as HumanTime

> If you need local time, add your offset from Universal
> Coordinated Time.

> -- Steve Kass
> -- Drew University
> -- Ref: 4207C042-C4BA-4EC5-8161-B27ADEB662AD


> >I wanted to check if anyone had written a UDF or some SQL to convert Unix
> >Epoch time to "human" time before I went ahead and tried.

> >Thanks!

 
 
 

Unix Epoch Time

Post by George Durz » Fri, 24 Oct 2003 22:56:49


Pls ignore last question, now I get it :)
Thanks for your response steve


> Steve,
> Where did you come up with 1066012345?
> Was it arbitrary?



> > George,

> >   It's a simple addition of seconds to the Unix epoch base
> > moment:



> > select

> >   dateadd(second,1066012345,'19700101') as HumanTime

> > If you need local time, add your offset from Universal
> > Coordinated Time.

> > -- Steve Kass
> > -- Drew University
> > -- Ref: 4207C042-C4BA-4EC5-8161-B27ADEB662AD


> > >I wanted to check if anyone had written a UDF or some SQL to convert
Unix
> > >Epoch time to "human" time before I went ahead and tried.

> > >Thanks!

 
 
 

Unix Epoch Time

Post by Steve Kas » Fri, 24 Oct 2003 22:59:34


I just wanted a time around now, and I changed the last few digits of "now".

SK


>Steve,
>Where did you come up with 1066012345?
>Was it arbitrary?



>>George,

>>  It's a simple addition of seconds to the Unix epoch base
>>moment:



>>select

>>  dateadd(second,1066012345,'19700101') as HumanTime

>>If you need local time, add your offset from Universal
>>Coordinated Time.

>>-- Steve Kass
>>-- Drew University
>>-- Ref: 4207C042-C4BA-4EC5-8161-B27ADEB662AD


>>>I wanted to check if anyone had written a UDF or some SQL to convert Unix
>>>Epoch time to "human" time before I went ahead and tried.

>>>Thanks!

 
 
 

1. conversion of Unix epoch time to a datetime value

I have an ASCII file containing times held as the number of seconds from
1970 and am wanting to load this value into an Informix table to give a
datetime value. As a datetime value is held as an integer is there an easy
procedure within ISQL to enable this ?
Thanks
--
Graham Bartlett

2. Desktop Edition??

3. unix epoch in date and time for two columns

4. Oracle Financials Functional Analyst -SF-Start Up Co.

5. convert from datepart('epoch', now()) to Date / time

6. DUMP DATABASE ???

7. Frustration with date/times/epoch in v7.3.

8. how to delete records in a delimited text file?

9. UDF to Convert UNIX time into 12 hour time

10. Unix time/date => Pick time/date

11. Convert DATE to seconds since epoch

12. epoch from date field