Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Format date problem

Hi, I've tried to calc into my formula a date variable. but nothing happened

I tried all this options:

//Let vDate = num(makedate(DD/MM/YYYY));

//Set vDate = Date(DD/MM/YYYY);

//Set vDate =$(vDate);

//Set vDate =num(date('$(vDate)'));

//Set vDate = Date(DD/MM/YYYY);

//LET vDate = Num(MonthEnd(today()));

//LET vDate = date#(dd-mm-yyyy);

My Final result always is a number.

I need to rest (vdate-Date)

Thank You.

7 Replies
pgalvezt
Specialist
Specialist
Author

I tried this to but nothing:

LET vDate = date(date#(dd/mm/yyyy));

if(sum(date(Date#('$(vDate)'))-TD_Mora)= date(Date#('$(vDate)')), Dual('Al Día',1),

if(sum(date(Date#('$(vDate)'))-TD_Mora)>=1   And sum(date(Date#('$(vDate)'))-TD_Mora)<=30,  Dual('1-30  Días',2))) as EST

In my Variable panel appears 10/05/2012. Thats ok But in my Dimension EST appears -

With the total Expression.

Thank you.

pgalvezt
Specialist
Specialist
Author

Any Help. ah! This formula works as Dimmension Calculated but not in the script.

Thanks

swuehl
MVP
MVP

I believe something like

LET vDate = date(date#(dd/mm/yyyy));

is not a valid syntax. dd/mm/yyyy looks like a format code, but you should put the code in single quotes and use it as second (optional) argument. First mandatory argument (which I can't see here), should be the date string you want to interpret.

Maybe more important than the syntax: What date do you want to assign vDate to?

pgalvezt
Specialist
Specialist
Author

The variable should be stay like DD/MM/YYYY.

I put my code for better comprenhension. The idea is gets the calc in the script and not the Dimmension Calculated. QlikView its getting too slow.

Thank You.

pgalvezt
Specialist
Specialist
Author

Any Help?.

Thanks.

pgalvezt
Specialist
Specialist
Author

Anyone can help me with this please.

Thanks!

CELAMBARASAN
Partner - Champion
Partner - Champion

Are you trying to compare with today's date?If so then  it should be

LET vDate = date(Today(),'DD/MM/YYYY');