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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Convert Time Bucket to Local Time

Hi Folks,

I have a time bucket in my table and it's starting from '00:00',it is in GMT. I need to convert this time bucket as to Local time (US).

Below is my code and output look like below . When i am using ConvertToLocalTime, its not working converting as expected.

Can anyone advise me on this issue.

The range could starts from 07:00- 07-30.

Time_Bucket:

load *,time(SubField((event_Buckets),'<=',1),'hh:mm') &' - '&

time(SubField((event_Buckets),'<',3),'hh:mm') as Event_Range;

LOAD EventDate,

     %StateKey ,

    class(frac(ConvertToLocalTime(TimeStamp)),1/48) as event_Buckets,

   

     ConvertToLocalTime(TimeStamp) as TimeStamp ,

 

    ConvertToLocalTime(eventdatetime) as eventdatetime,

   

from [$(File)](QVD);

Event_Buckets.PNG

Thanks

Krishna

3 Replies
krishna20
Specialist II
Specialist II
Author

Hi ,

Can anyone look into this issue.

Avinash R

Gysbert Wassenaar

Sunny Talwar

shiveshsingh
Master
Master

Is this not working?

ConvertToLocalTime(FieldName, 'EST')

avinashelite

If your time is in GMT then try like this , otherwise you need convert the time to GMT or UTC first and then use the formula

ConvertToLocalTime(TimeStamp,'Central Time (US &Canada)')