Week numbering functions

We’ve added new functions to allow you easily calculate week number.

There are following week numbering functions available:

  • ISOWeek(date) – calculates ISO 8601 week number. All weeks begin on a Monday. Week one starts on Monday of the first week of the calendar year with a Thursday. Used by most of European countries, most of Asia and Oceania.
  • Week(date) – calculates week number as follows: week one begins on January 1st; week two begins on the following first day of week specific for each location specified in “Language and location” database property. For Canada, USA, China, Korea, Japan, Israel, South Africa, most of Latin America it’s Sunday.
  • Week(date, number) – calculates week number as described above using specified first day of week (e.g. 0=Sunday, 1=Monday, 6 = Saturday etc.)
Tweet about this on TwitterShare on Facebook0Share on Google+0