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

YYYYMMWW

Hi,

How to create YYYYMMWW from date in script.

Rahul

1 Solution

Accepted Solutions
Not applicable
Author

Hi Rahul,

Please find the below script

hope it will be usefull.

=Num(Year(DateField),'0000') & Num(Month(DateField),'00') & Num(Week(DateField),'00')

Regards

$@M


View solution in original post

4 Replies
Not applicable
Author

Hi Rahul,

Please find the below script

hope it will be usefull.

=Num(Year(DateField),'0000') & Num(Month(DateField),'00') & Num(Week(DateField),'00')

Regards

$@M


jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

*,

Date(Today(), 'YYYYMM') & Num(Week(Today()), '00') AS YYYYMMWW

FROM DataSource;

Regards,

Jagan.

anbu1984
Master III
Master III

Date(DateField,'YYYYMM') & Right('0'&Week(DateField),2) As DateField

maxgro
MVP
MVP

load

     .....,

     date(yourdatefield, 'YYYYMM') & num(Week(yourdatefield), '00') as NewField,

     .....

from

     yoursource;