Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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 (2)
2 Replies
Highlighted
Partner
Partner

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]

Partner
Partner

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]

Plees ekskuse my Swenglish and or Norweglish spelling misstakes