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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date comparison in expression

Hi all,

I want to do a daily analisys so in the load script I have

LET TodayDate = today();

In the expression I compare with the field :

dtimport_formated that is obtained from dtimport in mysql load by:

CAST(dtimport AS DATE) as dtimport_formated

dtimport is an integer in the format : 20170710

the expression I use is

Sum({<dtimport_formated={$(TodayDate)}>}valor_brt)

it returns nothing, but...

if I use

LET TodayDate = date(today(),'YYYYMMDD');

and then compare it with

Sum({<dtimport={$(TodayDate)}>}valor_brt)


it works fine, but the date instead of showing dd/MM/YYYY is presented in YYYYMMdd




can anyone help ?

Labels (1)
11 Replies
Miguel_Angel_Baeyens
Support
Support

That likely means you need to use Date('$(TodayDate)') or '$(TodayDate)' with single quotes

Anonymous
Not applicable
Author

THANKS MIGUEL THATS IT !!!!