Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alex-wb
Contributor III
Contributor III

Extract Week, Year, and Quarter from Custom Dates

H All,

I have been building customer date variables based off of our financial week which starts on a Saturday and ends on a Friday. The Month also ends on the last Friday of the Month and the financial year also ends on the last Friday of the year. I have two variable built that captures this, but now I need to work out how to show numerically what year week, month and also quarter of the custom year I am in based on the current date.

Below are the variables for the week and month start.

 

let vFY_Week_Start = WEEKSTART(Today(),0,5) ;

let vFY_Month_Start = WEEKSTART((Monthstart(today())), 0, 5); 

2 Replies
tresesco
MVP
MVP

I didn't quite get what you are trying to achieve. However, I can say that your second variable expression is wrong. Have you checked the output?

alex-wb
Contributor III
Contributor III
Author

Hi Treseco thanks for pointing that out, I realised that was a variable I was playing around with and have inserted the correct variable.

What I am trying to achieve is working out the current numerical week, month, and QTR we are in based on my Financial year. 

So my current financial year start in on the 27/03/2021 and I would like to be able to build  variables that say based off of todays date and you financial year rules  you are in month 1, week 4, q1, does that make sense?Thanks,

Alex