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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Local Time to UTC with Daylight Saving Handled Automatically

Hi

I was trying to capture the create time of a QVD file and convert it from local time to UTC.

But I found that QVDCreateTime function will return a timestamp with timezone UTC rather than my local time zone.

Can we control the timezone of the return from QVDCreateTime function?

Thank you

Paco

13 Replies
jagan
Partner - Champion III
Partner - Champion III

=ConvertToLocalTime(Now(), 'UTC-08:00')

Not applicable
Author

Hi tresesco:

I am not sure that works.

LET v2 = TIMESTAMP(QVDCREATETIME('[Your QVD File]'), 'YYYY-MM-DD hh:mm:ss');

LET v3 = TIMESTAMP(CONVERTTOLOCALTIME(CONVERTTOLOCALTIME(QVDCREATETIME('[Your QVD File]'),'UTC-10:00'), 'Sydney'), 'YYYY-MM-DD hh:mm:ss');

v3 convert QVD time from local to UTC and then back to local. And v3 is different from v2.

Correct me if I am wrong.

Thank you.

PC

tresesco
MVP
MVP

I see Sydney -('GMT+11')

Untitled.png

try with:

ConvertToLocalTime(YourTime, 'UTC-11:00'); 

Not applicable
Author

Hi tresesco:

I think the reason why it is showing UTC 11 is because of the Daylight Saving.

So specifying time zone rather than city will not handle Daylight Saving automatically.

PC