Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Change date format

HI all,

I am using the below expression to change the date format but it's not changing.

yearend(max(CanonicalDate,'MM-DD-YYYY'),-1)

I need the count till last year end. in my db the date format is 'MM-DD-YYYY' so i am using above expression but it's not changing.

it's printing in 'MM/DD/YYYY' when i print in text box

Thanks,

Pramod

Tags (1)
5 Replies

Re: Change date format

Not sure what you are trying to do, but may be this:

Date(YearEnd(Max(Date#(CanonicalDate, 'MM-DD-YYYY'))), 'MM-DD-YYYY')

balrajahlawat
Esteemed Contributor

Re: Change date format

Try like:

=yearend(date(max(CanonicalDate),'MM-DD-YYYY'),-1)



Not applicable

Re: Change date format

Can you please help on this,

I am trying to get the count from particular date but i am not able to get.

I am attaching the .qvf file.

Data from 11-30-2014  31-12-2014.

Please check my KPI

Employee
Employee

Re: Change date format

Careful here... YearEnd returns a timestamp that is not an integer, and the non-integer part is hidden by the Date() function. This can cause problems. I would not use

    Date(YearEnd(...

Instead I would use

    Date(Floor(YearEnd(...

HIC

Community Browser