Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Converting Unix Time into PDT

Hi

I have a Unix Time stamp ,

Unix Date: 1280867588 which has to be converted to PDT with time stamp, as 08/03/2010 06:33:08

Please Help.

1 Solution

Accepted Solutions
Not applicable
Author

I don't know nothing about "FROM_UNIXTIME(info_startdate)".

But the first expression doesn't do any Time Zone conversion. It converts unix datetime to QV datetime. And QV datetime time zone will be the same as unix datetime time zone. The question is what the unix time zone is. You should know it before any Time Zone conversion.

View solution in original post

6 Replies
Not applicable
Author

Something like this:

=timestamp((1280867588 /(24*60*60)) + (2 + date#('1/1/1970') - date#('1/1/1900')))


Anonymous
Not applicable
Author

By using the above i get the value 8/3/2010 8:33:08 PM,

the actual value in GMT & PST for 1280867588
are below, could any one please let me know what is the time zone this syntax is converting to ? I need in PST/PDT

GMT Time: 2010-08-03 20:33:08
PST8PDT Time: 2010-08-03 13:33:08

villafuerte
Partner Ambassador
Partner Ambassador

Hi,

If your source data is a Unix TimeStamp you can use this in the SQL part of the LOAD statement:

(the date I was trying to convert was info_startdate)

SQL SELECT *, FROM_UNIXTIME(info_startdate) as Info_Start_Date

Not applicable
Author

You are really beginner. Smile Try to read the Help before ask. Here is your function:

=ConvertToLocalTime(
timestamp((1280867588 /(24*60*60)) + (2 + date#('1/1/1970') - date#('1/1/1900')))
, 'GMT-08:00')


Anonymous
Not applicable
Author

Thank you very much for the reply , Could anybody please tell me what is the Time Zone the unix time is being converted into when using :

timestamp((start_time /(24*60*60)) + (2 + date#('1/1/1970') - date#('1/1/1900')))

or

FROM_UNIXTIME(info_startdate)

Not applicable
Author

I don't know nothing about "FROM_UNIXTIME(info_startdate)".

But the first expression doesn't do any Time Zone conversion. It converts unix datetime to QV datetime. And QV datetime time zone will be the same as unix datetime time zone. The question is what the unix time zone is. You should know it before any Time Zone conversion.