The Airtable Community will undergo scheduled maintenance on September 17 from 10:00 PM PST to 11:15 PM PST. During this period, you may experience temporary disruptions. We apologize for any inconvenience and appreciate your understanding.

# when does a week start?

Topic Labels: Dates & Timezones Formulas
486 0
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast
I have a sort of complicated question about how date formulas treat the concept of a 'week.'

This formula also considers the week to be Sunday thru Saturday:

`DATETIME_FORMAT(Date, 'w')`

For a record dated Sunday June 18, the value returned here is 25. (The same value as today, Wed June 21.)

However, consider this formula:

`IF(AND(VALUE(DATETIME_FORMAT({Date},"w"))=VALUE(DATETIME_FORMAT(NOW(),"w")),YEAR({Date})=YEAR(NOW())),"Y", "N")`

This formula reports whether a given record's date falls within the current week. So, a record dated Sunday June 18 would get a "N" if the week is Sun thru Sat.

But! A "Y" is returned, because this formula is considering a week as Mon thru Sun.

Does anybody know why this inconsistency would occur? Thank you for your help!
0 Replies 0