Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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 ?

11 Replies
Miguel_Angel_Baeyens

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

Anonymous
Not applicable
Author

THANKS MIGUEL THATS IT !!!!