Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

kshitijas
New Contributor III

QS-last date of the month

hello everyone,

          how to get last date of the month?

Thanks

20 Replies

Re: QS-last date of the month

Use MonthEnd() function

MVP
MVP

Re: QS-last date of the month

May be like this:

Date(Floor(MonthEnd(Today())))

Replace Today() with whichever date's last date of the month you are looking to get

sureshqv
Esteemed Contributor III

Re: QS-last date of the month

Re: QS-last date of the month

Which month? And which date, the last existing date for that month that exists in your data or the one that's the last day of the month?


talk is cheap, supply exceeds demand
kshitijas
New Contributor III

Re: QS-last date of the month

is dis correct ??

Date(MonthEnd(( ModifiedDate)), 'DD/MM/YYYY') as lastdate;

MVP
MVP

Re: QS-last date of the month

I would add a Floor in there as well because MonthEnd gives a timestamp something like this -> 05/31/2016 23:59:59


Date(Floor(MonthEnd(ModifiedDate)), 'DD/MM/YYYY') as lastdate;

kshitijas
New Contributor III

Re: QS-last date of the month

i have one more requirement ie.

need last date of fiels named as Handover date and Takeover date.

How  do i do that?

MVP
MVP

Re: QS-last date of the month

Same logic for all the fields I guess

Date(Floor(MonthEnd([Handover date])), 'DD/MM/YYYY') as lastdate_Handover,

Date(Floor(MonthEnd([Takeover date])), 'DD/MM/YYYY') as lastdate_Takeover;

kshitijas
New Contributor III

Re: QS-last date of the month

Thanks Sunny T