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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

Forcing date format in load

I do believe I'm using the correct formula to accomplish the task of forcing my field to be YYYY-MM-DD:

Date(Date#(dtDelivered,'YYYY.MM.DD hh:mm:ss'), 'YYYY-MM-DD hh:mm:ss') as dtDelivered,
Date(Date#(dtDelivered,'YYYY.MM.DD hh:mm:ss'), 'YYYY-MM-DD') as Date_envois_force

 

Alas, Date_envois is treated like it has multiple values, the exact same that we're there before forcing it to the correct format:

sibrulotte_0-1638047870896.png

What should I be doing to obtain only 2021-05-05 ?!?

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

date/timestamps are dual field type, so despite it having same text displayed, it's still different values due to timestamp.  you need to alter the value (ex. Floor())

 

Date(Floor(Date#(dtDelivered,'YYYY.MM.DD hh:mm:ss')), 'YYYY-MM-DD') as Date_envois_force

View solution in original post

1 Reply
stevejoyce
Specialist II
Specialist II

date/timestamps are dual field type, so despite it having same text displayed, it's still different values due to timestamp.  you need to alter the value (ex. Floor())

 

Date(Floor(Date#(dtDelivered,'YYYY.MM.DD hh:mm:ss')), 'YYYY-MM-DD') as Date_envois_force