Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting Text to Dates

I have a list of text.

Ex.

Month 1

Month 2

Month 3

Month 4 etc...

Where month 1 is the current month, month 2 is the previous month, month 3 is the month before that and so on.

I need to convert them so that the current month returns the first day of this month (6/1/2013, the previous month, the month before that, etc all as the first day of their corresponding months).

Month 1     06/01/2013

Month 2     05/01/2013

Month 3     04/01/2013

Month 4     03/01/2013

Any ideas would be fantastic as I am completely stuck.

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try something like

LOAD Month,

     Date(Monthstart(today(),1-subfield(Month,' ',2))) as MonthDate;

LOAD * INLINE [

Month

Month 1

Month 2

Month 3

Month 4

];

View solution in original post

2 Replies
swuehl
MVP
MVP

Try something like

LOAD Month,

     Date(Monthstart(today(),1-subfield(Month,' ',2))) as MonthDate;

LOAD * INLINE [

Month

Month 1

Month 2

Month 3

Month 4

];

Not applicable
Author

AWESOME!!