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

to remove 2H30 from the time, and then return only the time (i.e. the remainder) from the real number.

I have been asked to remove 2H30 from the time, and then return only the time (i.e. the remainder) from the real number. Explain how you would do this using basic programming methods.can i get help please

1 Reply
Gysbert_Wassenaar

If 2H30 means 2 hours and 30 minutes then that's a fraction 5/48 of a day. By subtracting 5/48 from a date or timestamp you get a new timestamp that's 2 hours and 30 minutes ealier. You can get the time part of that timestamp by using the frac function: frac(MyTimestamp - 5/48). If you want to format that as a time you can use the time function: time(frac(MyTimestamp - 5/48),'hh:mm')


talk is cheap, supply exceeds demand