Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Convert date to week number starting with a specific date

Topic Labels: Formulas
1514 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Maya_Hajj_Hasan
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a field called “Campaign Date” in my database where I start my experiment (November 1st). I would like to create a field where my first week of experiments is labeled Week 1, and so on.

Can someone point me in the right direction?

1 Reply 1
Gilles_BECHARD
4 - Data Explorer
4 - Data Explorer

Hello Maya
I’m not sure I understand what you want
But if you want to return the week number of a date (eg : fieldname = “Campaign Date”) based on the first of november 2021, you can add a formula field: “Campaign Week”
1+DATETIME_DIFF(
{Campaign Date},
DATETIME_PARSE(“11/01/2021”,“MM/DD/YYYY”),
‘w’
)

You add 1 so that first week is 1 , not 0