Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

Dates

I have an app which is loading in dates as datetime field. I've created a calendar from this datetime field but when making selections on the calendar controls it isn't work. I've attached some sample data for yesterdays date. As you can see there are many rows that contain the date 19/07/2016 hh:mm:ss but when you use the calendar controls on dates with 19/07/2016 00:00:00 shows, why?

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Kevin

Use Date(Floor(YourDatefield),'DD/MM/YYYY') in your load script and this swill strip out the date part of the datestamp and then this will associate correctly with the master calendar.

Hope this works for you.

View solution in original post

7 Replies
danansell42
Creator III
Creator III

Hi Kevin

Wasn't able to open the app.

Its probably worth rounding down the date field to remove the hh:mm:ss.

I usually use the floor function.

This should resolve the issue

Dan

Anonymous
Not applicable

Hi Kevin

Use Date(Floor(YourDatefield),'DD/MM/YYYY') in your load script and this swill strip out the date part of the datestamp and then this will associate correctly with the master calendar.

Hope this works for you.

effinty2112
Master
Master

Hi Kevin,

                    Looks like your dates are formatted as timestamps.

Try this expression in your frontend or in your load script.

Date(Floor(Timestamp#(YourField, 'DD/MM/YYYY hh:mm:ss')))


When Timestamp# converts your field to a number Floor will drop any fractional part.


Cheers


Andrew



kevbrown
Creator II
Creator II
Author

None of the suggestions work

kevbrown
Creator II
Creator II
Author

This is giving me 00 for months

kevbrown
Creator II
Creator II
Author

It is working!! Thanks

Anonymous
Not applicable

You're welcome Kevin. We all go through nightmares with dates. Glad it's working now and any other issues that's why the community is there for us all.