Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

Convertolocaltime returning wrong time of the day

Hello,

I don;t think this script is working properly. any ideas why it is returning pm instead of AM?

ConvertToLocalTime(Timestamp(Now()),'GMT+02:00')

Right now I know it is AM in Paris for example.

Thanks

13 Replies
techvarun
Specialist II
Specialist II

Try Below Code:

TEST:

Load * Inline [

DateField

22-10-2017 11:00:43

];

LOAD *, ConvertToLocalTime(timestamp(DateField - maketime(5,30)), 'GMT+02:00') as Paris Resident TEST;

Drop Table TEST;

I am using maketime(5,30)) since i currently fall on GMT+05:30 timezone you might need to adjust the maketime depends on your operating system settings.

Thanks

didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Varun,

am in GMT +  11:00  so if I understand correctly we my script should be?

ConvertToLocalTime(timestamp(DateField - maketime(11)), 'GMT+02:00')


?


Thanks

techvarun
Specialist II
Specialist II

Yes, Correct.

try and let us know the result

Thanks,

Varun

didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks Varun, I have tested with my data and it worked.