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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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>}