Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Format date

Dear All,

I have the expression like :

=Sum( {<Date = {">= $(vStartDate)<=$(vEndDate)"} FareAmount>}

Where vStartDate and vEndDate  are may date variable in number format.

I want to format those variable with date format like (DD-MM-YYYY)

and that i want to do in set analysis so it should be like

=Sum( {<Date = {">= $(=Date(vStartDate,'DD-MM-YYYY)<=$('=Date(vEndDate, 'DD-MM-YYYY'))"} FareAmount>}

Please advise how to write in correct sysntax.

1 Reply
petter
Partner - Champion III
Partner - Champion III

You could either write this - which is the same as you had except for an added (missing) single quote character ' and ending characters for the modifier and set   >}   removing a misplaced single quote before the equal sign:

=Sum( {<Date = {">= $(=Date(vStartDate,'DD-MM-YYYY')<=$(=Date(vEndDate, 'DD-MM-YYYY'))"}>} FareAmount>}


or - if this DD-MM-YYYY format is already default date format then this:


Sum( {<Date = {">= $(=Date(vStartDate)<=$(=Date(vEndDate))"}>} FareAmount>}