Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Subtract hours from timestamp

Hi guys,

 

How to subtract 5 hours from a timestamp filed named DateAndTime? Something like:

Timestamp(DateAndTime-05:00:00,'MM/DD/YYYY hh:mm:ss')

 

Thanks in advance!

2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

DateAndTime - MakeTime(5)

-Rob

View solution in original post

vishsaggi
Champion III
Champion III

Hi Rob,
May be we need to use Timestamp around your expr to get the datetime.

Timestamp(DateAndTime - MakeTime(5))

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

DateAndTime - MakeTime(5)

-Rob

vishsaggi
Champion III
Champion III

Hi Rob,
May be we need to use Timestamp around your expr to get the datetime.

Timestamp(DateAndTime - MakeTime(5))