
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change date format from DD/MM/YYYY HH:MM to just DD/MM/YYYY
Hi - how can I change the date format from:
DD/MM/YYYY HH:MM to just DD/MM/YYYY
example:
27/11/2019 09:43 to 27/11/2019
Preferably within script itself. Thought about using something lines of:
date(floor(timestamp([AD_Event_DT])),'DD/MM/YYYY')
but this doesn't work.
Where AD_Event_DT is the field I need to use for Event Date.
Thanks guys.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I would normally use the following which has always worked for me
Date(Floor([AD_Event_DT]),'DD/MM/YYYY')
Cheers
Adrian


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or maybe try this:
date#(left(Datestamp,index(Datestamp,' ')),'DD/MM/YYYYY')as [Event Date]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi - this works:
DATE(timestamp#(AD_Event_DT,'DD/MM/YYYY hh:mm')) as Event_Date
BUT, when I try to plot the event date as dimension on a graph, it is not reflecting properly i.e. for each different variation of DD/MM/YYYY hh:mm it's counting as a single instance, rather than summing all of the instances up altogether?
For example - events on 04/12/2019 should be 15 in total. However, the graph is displaying it as 15 individual instances of 04/12/2019 with differing hh:mm's! How can I resolve this?
Thanks.
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are a couple of Design Blog posts that I believe may help:
https://community.qlik.com/t5/Qlik-Design-Blog/The-Date-Function/ba-p/1463157
https://community.qlik.com/t5/Qlik-Design-Blog/Why-don-t-my-dates-work/ba-p/1465849
I believe the problem is you left off the formatting you wanted with the DATE function:
DATE(timestamp#(AD_Event_DT,'DD/MM/YYYY hh:mm')'DD/MM/YYYY') as Event_Date
That will drop the hh:mm piece, which I think is what you really want...
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
