Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ryan32887
Contributor
Contributor

Converting Timestamp from PST to EDT

I've tried a plethora of different scenarios here and my problem revolves around DST, currently my formula works for non-DST but DST is one hour off (long).

Timestamp(ConvertToLocalTime(ConvertToLocalTime(Date,'GMT+08:00'),'GMT-04:00'),'M/D/YY hh:mm TT')

I have tried ignoring DST on both sides but whenever I try that, my output is the same, here is my syntax on that piece:

ConvertToLocalTime(Date,'GMT+08:00',True())

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

I used your formula and it appears to work correctly:

=ConvertToLocalTime(ConvertToLocalTime('2020-06-06 00:00:00','GMT+08:00'),'New York') returns 4am which is correct

=ConvertToLocalTime(ConvertToLocalTime('2020-01-01 00:00:00','GMT+08:00'),'New York') returns 3am which is correct

I'm not sure why you're comparing PST to DST in the first place, but I'm sure you have your reasons - that said, you seem to have the right formula in place so I'm not sure what the issue is.

View solution in original post

3 Replies
Or
MVP
MVP

Lifted directly from the Qlik Help site:

When processing a timestamp with a date or time function, QlikView ignores any daylight savings time parameters unless the date or time function includes a geographical position.

For example, ConvertToLocalTime( filetime('Time.qvd'), 'Paris') would use daylight savings time parameters while ConvertToLocalTime(filetime('Time.qvd'), 'GMT-01:00') would not use daylight savings time parameters.

ryan32887
Contributor
Contributor
Author

I've tried the below, this gives me non-DST is one hour short and DST in one hour long.

Converting PST to GMT, then converting GMT to EDT.

Timestamp(ConvertToLocalTime(ConvertToLocalTime([Reply Date],'GMT+08:00'),'Eastern Time (US & Canada)'),'M/D/YY hh:mm TT')

Or
MVP
MVP

I used your formula and it appears to work correctly:

=ConvertToLocalTime(ConvertToLocalTime('2020-06-06 00:00:00','GMT+08:00'),'New York') returns 4am which is correct

=ConvertToLocalTime(ConvertToLocalTime('2020-01-01 00:00:00','GMT+08:00'),'New York') returns 3am which is correct

I'm not sure why you're comparing PST to DST in the first place, but I'm sure you have your reasons - that said, you seem to have the right formula in place so I'm not sure what the issue is.