Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
schmidtkm37
Contributor III
Contributor III

Date formatting in load script

Hello,

I'm having an issue formatting a date field coming in from a CSV file. The field is formatted like:

8/9/2020 0:00:00

8/10/2020 0:00:00

10/10/2019 0:00:00

which is causing issues because I can't just take the left 10 characters since sometimes I only need the left 8 and sometimes 9. I've tried using date() and makedate() but nothing has worked. Any suggestions on the best way to get Qlik to recognize this as a date and get it formatted to not include the "0:00:00"? 

Labels (1)
1 Solution

Accepted Solutions
schmidtkm37
Contributor III
Contributor III
Author

Never mind, I got it. I just used left(field,len(field)-8) to trim the right side off and then I was able to use date() to make it a date. 

View solution in original post

2 Replies
schmidtkm37
Contributor III
Contributor III
Author

Never mind, I got it. I just used left(field,len(field)-8) to trim the right side off and then I was able to use date() to make it a date. 

Taoufiq_Zarra

@schmidtkm37 

Maye be :

Date#(subfield(F1,' ',1),'M/D/YYYY') as New_date

 

output :

Capture.PNG

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉