Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jisephcirspy
Contributor III
Contributor III

Add +2 hours to a timestamp

Hello,

 

I want to add 2 hours to a timestamp (I cannot change it in the database).

The timestamp looks like this 2020-09-22 06:30:02.000000 (YYYY-MM-DD hh:mm:ss.miliseconds)

1 Solution

Accepted Solutions
Taoufiq_Zarra

@jisephcirspy  like :

=timestamp(Date#('2020-09-22 06:30:02.000000','YYYY-MM-DD hh:mm:ss.ffffff') + 2/24)

 

Example : 2020-09-22 06:30:02.000000

output:

Capture.PNG

2/24-> Nbofhour/24

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@jisephcirspy  like :

=timestamp(Date#('2020-09-22 06:30:02.000000','YYYY-MM-DD hh:mm:ss.ffffff') + 2/24)

 

Example : 2020-09-22 06:30:02.000000

output:

Capture.PNG

2/24-> Nbofhour/24

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
jisephcirspy
Contributor III
Contributor III
Author

Thank you very much @Taoufiq_Zarra !!! helped me a lot