Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
tyagishaila
Specialist
Specialist

Today()

Is there any difference between

LET vTodayDate=Today(Date);

and

LET vTodayDate=Today();

where Date is a dimension in table,

8 Replies
yduval75
Partner - Creator III
Partner - Creator III

Today(Date) will not work

You can just use today() function

jyothish8807
Master II
Master II

Hi Sahil,

Today(Date) will not work instead of that try max(Date).

Regards

KC

Best Regards,
KC
Anonymous
Not applicable

Use peek. Like

let vToday = peek('Date');

BR

Serhan

tyagishaila
Specialist
Specialist
Author

But Its working in my script,

LET vTodayDate= Today();

gives me o/p  on Text Object 12/11/2014

and

LET vTodayDate=Today(Date);

gives o/p 12/12/2014

which is right.

Why it happens I don't know

tyagishaila
Specialist
Specialist
Author

But

why Let vTodayDate = Today();

is not giving correct o/p.

Its giving 12/11/2014

arulsettu
Master III
Master III

hi try

=Date(Today())

Anonymous
Not applicable

Hello,

Today() can take parameters. Not the date though. From QlikView Help:

Today()

Returns the current date from the system clock. The timer_mode may have the following values:

0 Date at script run
1 Date at function call
2 Date when the document was opened  

Default timer_mode is 2. The timer_mode = 1 should be used with caution, since it polls the operating system every second and hence could slow down the system.

tresesco
MVP
MVP

Today() allows an argument which indicates [timer mode].

today([timer_mode] )

Returns the current date from the system clock. The timer_mode may have the following values:

0 Date at script run
1 Date at function call
2 Date when the document was opened 

Default timer_mode is 2.

When you pass an argument which is not any of these three(0,1,2), it would probably take the default value 2. Eventually here both return same output for you. Hope that makes sense.