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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create Date from String

Hey All,

I have tried a bunch of things, but am unable to convert the TimeCardDate (DD-MON-YY) from a string to a date field.

Any help would be appreciated - here is the format of the data:

TimeCardDate
02-OCT-16
09-OCT-16
16-OCT-16
18-SEP-16
23-OCT-16
24-JUL-16
25-SEP-16
30-OCT-16

Thanks Vince

Labels (1)
1 Solution

Accepted Solutions
Clever_Anjos
Support
Support

Please try this:

SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

LOAD Date(Date#(lower(TimeCardDate),'DD-MMM-YY')) as TimeCardDate Inline [

TimeCardDate

02-OCT-16

09-OCT-16

16-OCT-16

18-SEP-16

23-OCT-16

24-JUL-16

25-SEP-16

30-OCT-16

]

View solution in original post

2 Replies
Clever_Anjos
Support
Support

Please try this:

SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

LOAD Date(Date#(lower(TimeCardDate),'DD-MMM-YY')) as TimeCardDate Inline [

TimeCardDate

02-OCT-16

09-OCT-16

16-OCT-16

18-SEP-16

23-OCT-16

24-JUL-16

25-SEP-16

30-OCT-16

]

Not applicable
Author

worked like a charm - thank you