Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any variable or function in QlikView that returns the current system date,time?
Then id like to subtract the current date with a give date and return the number of days.
Any idea on how this can be done?
Sure. Try now() or localtime(). Keep in mind that they poll the system every second for the time though.
You might want to do now(2) to pull the time when the document was opened.
Sure. Try now() or localtime(). Keep in mind that they poll the system every second for the time though.
You might want to do now(2) to pull the time when the document was opened.
thank you. i've just edited the post. can you answer my second question too?
If you only want the number of days you can use:
=today() - YourDate
This assumes that you've provided your date in a date formatted way, the way specified in the script under DateFormat.
If you want to enter a date into a variable you can use:
=Today() - $(VariableName)
If your date contains a time section too the result will have a decimal part indicating the time of the day. This can be removed by using the floor() function around the expression:
=Floor(Today() - $(VariableName))