Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Error while using Today() and now() for no. of days calculation

Hi People

I want to calculate no. of days for a claim to expire but when i use now() or today(), it throws an error.

qliksense today.PNG

1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

Re: Error while using Today() and now() for no. of days calculation

Hi Balaji,

try to use parameter inside function.(http://help.qlik.com/en-US/sense/November2017/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/...)

Either 0, 1 or 2.

ExampleResult

now( 0)

Returns the time when the last data load completed.

now( 1)

  • When used in a visualization expression, this returns the time of the function call.
  • When used in a data load script, this returns the time of the function call in the current data load.

now( 2)

Returns the time when the app was opened.

BR

Martin

View solution in original post

2 Replies
Highlighted
Creator III
Creator III

Re: Error while using Today() and now() for no. of days calculation

Hi,

Can you post the full expression? Both functions are quiet simple, I haven't come across many issues with neither of the functions so far.

As per Qlik guide:

Now()  ---- This function returns a timestamp of the current time from the system clock

Today() ---- This function returns the current date from the system clock.



Highlighted
Creator III
Creator III

Re: Error while using Today() and now() for no. of days calculation

Hi Balaji,

try to use parameter inside function.(http://help.qlik.com/en-US/sense/November2017/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/...)

Either 0, 1 or 2.

ExampleResult

now( 0)

Returns the time when the last data load completed.

now( 1)

  • When used in a visualization expression, this returns the time of the function call.
  • When used in a data load script, this returns the time of the function call in the current data load.

now( 2)

Returns the time when the app was opened.

BR

Martin

View solution in original post