Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jayati_shrivast
Contributor III
Contributor III

adding hours to time

Hi All,

I have a date-time field in the format MM-DD-YYYY hh:mm:ss. I need to add 10 hours to this field. currently the time is in UTC , I need to convert it to local system time. How can I implement this?

pls help.

4 Replies
lblumenfeld
Luminary Alumni
Luminary Alumni

=Date(YourFieldName + (10/24), 'DD/MM/YYYY hh:mm:ss')

You may have to use

=Date(Date#(YourFieldName, 'DD/MM/YYYY hh:mm:ss') + (10/24), 'DD/MM/YYYY hh:mm:ss')

or, if it's a variable

=Date(Date#('$(YourFieldName)', 'DD/MM/YYYY hh:mm:ss') + (10/24), 'DD/MM/YYYY hh:mm:ss')

jayati_shrivast
Contributor III
Contributor III
Author

thanks .. will implement this.

lblumenfeld
Luminary Alumni
Luminary Alumni

Great. Please mark the solution as correct if it works for you.

gandalfgray
Specialist II
Specialist II

Hi Jayati

I suggest you use the ConvertToLocalTime(timestamp [, place [, ignore_dst=false]]) function:

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTi...