Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Changing a timestamp

Hi I have a very simple question here. I have a time variable here t=now(); And I want to get a time 15 minutes before that and store it in another variable. How can I do this?

1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

hi,

You can use this in your other variable :

=timestamp(now()-maketime(00,15,00))

For more information on Time in Qlikview you can read : http://qlikviewnotes.blogspot.fr/2011/10/correct-time-arithmetic.html

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

5 Replies
christophebrault
Specialist
Specialist

hi,

You can use this in your other variable :

=timestamp(now()-maketime(00,15,00))

For more information on Time in Qlikview you can read : http://qlikviewnotes.blogspot.fr/2011/10/correct-time-arithmetic.html

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
Anonymous
Not applicable
Author

LET NewTime=timestamp (now()-1/96)
Not applicable
Author

Hi,

t2=date(now()-.0104167)

should do the trick

for date arythmetics

now() - 1   is yesterday same hour

now() - (1/24)  is now minus one hour

now() - ((1/24)/4) is now minus 15 minutes

Not applicable
Author

just try

=date(now()-Time#(15,'mm'),'DD.MM.YYYY hh:mm')

Not applicable
Author

Hi guys,

Thank you for your prompt reply. Your answers are all correct. Appreciate the help you all give me:)

Regards,

Xue Bin