Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to change week number to monday date

Is there any way to change a week number to the Monday date?

For example, I have the week number in my data (i.e 201431, 201430, 201429, etc) and I would like to show it as (7/28/2014, 7/21/2014, 7/14/2014, etc)

How can I do this in the script?

1 Solution

Accepted Solutions
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

Ajay Prabhakaran pointed out an example with inline data, in your case you just have to include this line in your script (in the table where you want to create this new field):

MakeWeekDate(Left(Field,4),Right(Field,2)) as NewField


regards

View solution in original post

3 Replies
Not applicable
Author

Attached with answer.

LOAD *,MakeWeekDate(Left(Field,4),Right(Field,2)) as New INLINE [

    Field

    201431

    201430

    201429

];

Thanks

Not applicable
Author

Thank you Ajay.

When 201432 week data is uploaded, will it automatically get updated since it is not in the original inline load?

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

Ajay Prabhakaran pointed out an example with inline data, in your case you just have to include this line in your script (in the table where you want to create this new field):

MakeWeekDate(Left(Field,4),Right(Field,2)) as NewField


regards