Week starting with Friday


#1

im looking to configure a column for “week” using weeknum(date) but i need my week to start on friday (first day of our pay period). i thought (date-3) might work but i just get an error… please help…


#2

In part it depends on how you wish to shift the week, I’m assuming you’d want the number of the week Sunday-to-Saturday week that begins two days after pay period Friday, so you’d want to add days, not subtract them — but you wouldn’t want to add days to jut any date. See if this gets you what you want:

IF(WEEKDAY(Date)>4,WEEKNUM(DATEADD(Date,2,'days')),WEEKNUM(Date))


#3

thanks W_Vann_Hall https://community.airtable.com/u/w_vann_hall
appears to work perfectly although i dont completely follow the formula.
regardless, i plugged it in and it works… thx again… TP


#4

Yeah, I guess I left off the last paragraph of that reply… :wink:

  • IF(WEEKDAY(Date)>4

If {Date} is a Friday or Saturday…

  • WEEKNUM(DATEADD(Date,2,'days'),

…add two days to {Date}, ‘pushing’ Friday and Saturday into what would be the following week (or, inversely, moving the start of the week back two days to Friday); return WEEKNUM() for that week.

  • WEEKNUM(Date))

Otherwise (that is, the day of {Date} is Sunday through Thursday), return WEEKNUM() for the unchanged {Date}.