Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two Different Date Formatts In A Field

I have a field that contains two different date type.  They are as follows:

MM/DD/YYYY HH:MM:SS

M/D/YYYY HH:MM:SS

I want to remove the HH:MM:SS.  Typically, I would use LEFT(MyDate, 10) for the MM/DD/YYYY HH:MM:SS.  But since I have the two formats this does not work because for the dates in  M/D/YYYY HH:MM:SS the LEFT(MyDate, 10) will pull in the first "H" into my new date.  How do I convert these two formats into on date format of MM/DD/YYYY? 

Thanks in advance for your help

Brian

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See this blog post: Get the Dates Right


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
onetwothree123
Partner - Contributor III
Partner - Contributor III

Prox,

Use Date([FieldName],'MM/DD/YYYY')

Gysbert_Wassenaar

See this blog post: Get the Dates Right


talk is cheap, supply exceeds demand
onetwothree123
Partner - Contributor III
Partner - Contributor III

Gysbert,

Thanks for sharing HC's date post.

nizamsha
Specialist II
Specialist II

date(Myfield,'DD-MMMM-YYYY')