Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
jan2
Contributor
Contributor

Creating a new column in the script

Hi,

I have a large data set in which a column with a date exists (format: dd.mm.yyyy). Now I need to create an extra column which shows the respective calendar week and year. I want to implement that in the script. 

I hope someone can help me. 

Labels (4)
10 Replies
micheledenardi
Specialist II
Specialist II

[Table Name]:
Load
Data1,
WeekName(Data1) as [YearWeek Data1],
Data2,
WeekName(Data2) as [YearWeek Data2],
Data3,
WeekName(Data3) as [YearWeek Data3]
From[Data Source]

CONCATENATE (Table Name)
Load
Data 1,
WeekName([Data 1]) as [YearWeek Data 1],
Data 2,
WeekName([Data 2]) as [YearWeek Data 2],
Data 3,
WeekName([Data 3]) as [YearWeek Data 3]
From[Data Source]

Store[]
Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.