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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MonthEnd() Function producing incorrect date in Export

We have used the MonthEnd() function in our load script Master Calendar to create a Month End date for our "DataDate". We used this in a Pivot Table chart and it looks correct in Qlik, but converts to the next day in MS Excel. Found out that the reason for this is because Qlik Sense reads 12/31/2015 12:00:00 AM as 12/31/2015 where as Excel reads it as 1/1/2016.

I am sure I could come up with a quick remedy for this, however wanted to know what others thoughts were in this case and other cases they have had experience with.

Thanks!

Clayton

1 Solution

Accepted Solutions
sunny_talwar

Try adding Date and Floor to the MonthEnd, because MonthEnd gives a timestamp value.. for example 12/31/2017 23:59:59

Date(Floor(MonthEnd(....)))

View solution in original post

2 Replies
sunny_talwar

Try adding Date and Floor to the MonthEnd, because MonthEnd gives a timestamp value.. for example 12/31/2017 23:59:59

Date(Floor(MonthEnd(....)))

Anonymous
Not applicable
Author

Perfect! I was questioning the need for the Floor() function, but found it was necessary and research told me that the MonthEnd() function does some type of Time Stamping which requires the use of the Floor() function. Who knew?....not I.

Thanks for your answer. All is well in my personal shop. Good day!