Forum Discussion
jfernand
9 years agoFrequent Visitor
Converting date into YYYYWW
Hi team, I have a date in the 2017-01-01 format. I wanted to convert it into 201701 (week number 1 of the year 2017) I have used the formula Week Number = YEAR( Calendar(date) ) & WEEK( Cal...
- 9 years ago
I'd do it in this manner.
Week Number = INT ( CONCATENATE ( YEAR ( 'Calendar'[Date] ), FORMAT ( WEEKNUM ('Calendar'[Date] ), "00" )
)
)
Sean
9 years agoCommunity Champion
konstantinosIts good to see you back on here :smileyhappy:
ChihiroI should have thought of that shortcut - I like it :smileyhappy:
I actually use something similar for a Month Order Column
Month Order = VALUE ( FORMAT ( 'Calendar'[Date], "YYYYMM" ) )
AnonymousI believe you were in a hurry to post... :smileyhappy:
Week Number =
INT (
YEAR ( 'Calendar'[Date] )
& RIGHT ( "0" & WEEKNUM ( 'Calendar'[Date] ), 2 )
)jfernand Take your pick! :smileyhappy:
Anonymous
9 years agoNot applicable
Here is a simplier one
Week Number = YEAR(Calendar(date)) & FORMAT(WEEK(Calendar(date)), "00")