Skip to main content
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

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

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
Employee
Employee

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