Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

5 Replies
sunny_talwar

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

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

Anonymous
Not applicable
Author

Try like:

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



Not applicable
Author

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

hic
Former Employee
Former Employee

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