Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
702613300
Contributor
Contributor

Date format in Qlik

Hi Team,

I am using the below code . I am expecting only complete month data to be picked up .When I am adding the (and end_date=MonthEnd(end_date,0))  clause its not not picking up any rows  but I would expect to pick up 1 record.

Can you please help me with the correct syntax

XX :
load * inline [start_date,end_date
01/01/2000,31/01/2020
05/01/2000,31/01/2020
];

NoConcatenate
XX1 :
load * resident XX
where start_date=monthstart(start_date,0)
and end_date=MonthEnd(end_date,0);
drop table XX;
exit Script;

Labels (1)
1 Solution

Accepted Solutions
702613300
Contributor
Contributor
Author

Thanks you so much for the clarification and now its working as per expectation.

View solution in original post

2 Replies
Or
MVP
MVP

As per the MonthEnd documentation:

This function returns a value corresponding to a timestamp of the last millisecond of the last day of the month containing date.

monthend('19/02/2012') Returns 29/02/2012 23:59:59.


You'll need to floor that or use DayStart() to get rid of the timestamp, presumably, in your use case.

702613300
Contributor
Contributor
Author

Thanks you so much for the clarification and now its working as per expectation.