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

ADD and SUBTRACT Time

In Qlikview you can use ADDMONTHS and ADDYEARS to subtract or add months and years

Is there a similar function for time?

regards

Al

2 Replies
swuehl
MVP
MVP

Time and date are numbers in QlikView, just the text part is formatted accordingly.

So you can use maketime() etc, to create a time value (or just enter the number in fraction of days) and use arithmetic operations + and -.

jonathandienst
Partner - Champion III
Partner - Champion III

Remember that time is the fractional part of the datetime number. So 0.25 = 06:00 when formatted as time.

As swuehl said, its just simple arithmetic, so

To add 1 hour, add 1/24

To add 1 minute, add 1/1440

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein