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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Format date in script

I have a field called [Event Date] that is formatted as follows in my data:

10/4/2018  7:00:00 PM

I have attempted to do the following in my script:

DATE([Event Date], 'MM/DD/YYY')                    AS               eventDATE

I am doing this to get that field to link to other tables. However when I run the script, this creates duplicate values for each date:

10/4/18

10/4/18

10/6/18

10/6/18

etc.

etc

Am i formatting this incorrectly in the script?

1 Solution

Accepted Solutions
sunny_talwar

Try this

Date(Floor([Event Date]), 'MM/DD/YYY')                    AS               eventDATE

View solution in original post

4 Replies
nsetty
Partner - Creator II
Partner - Creator II

Try

DATE(Timestamp#([Event Date], 'MM/DD/YYYY hh:mm:ss'), 'MM/DD/YYYY') AS [Event Date]

evansabres
Specialist
Specialist
Author

When I do this in my script, the output appears as a dash "-"

sunny_talwar

Try this

Date(Floor([Event Date]), 'MM/DD/YYY')                    AS               eventDATE

evansabres
Specialist
Specialist
Author

This worked wonderfully, thank you