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: 
jgreen95
Contributor III
Contributor III

Force a date format in the script

I have a field that in the QVD is formatted as a DateTime (YYYY-MM-DD HH:mm:ss)

I only want it as a date in format DD/MM/YYYY

I am using this in the Script where i load the data and it seems to be completely ignored and is still showing in a date time format 

date([MASTER_CALANDER.SOM],'DD/MM/YYYY') as [MASTER_CALANDER.SOM]

Labels (1)
2 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

I am not sure, but you could try to add floor before date

date(Floor([MASTER_CALANDER.SOM]),'DD/MM/YYYY') as [MASTER_CALANDER.SOM]

Vegar
MVP
MVP

Does Qlik recognize [MASTER_CALANDER.SOM] as a timestamp or is it just a string? If a string, then try this:

=date(floor(timestamp#([MASTER_CALANDER.SOM],'YYYY-MM-DD hh:mm:ss')),'DD/MM/YYYY' ) as [MASTER_CALANDER.SOM]