From Xojo Documentation

Revision as of 19:05, 3 September 2020 by THill (talk | contribs) (Text replacement - "{{Deprecated" to "{{DeprecatedItem")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Read-Only Property (As Integer )
IntegerValue = aDate.WeekOfYear

Supported for all project types and targets.

The number of the week of the year the date falls in.


The first week is numbered 1. The first week may be incomplete. If January 1 falls on a Saturday, then the next day is in week 2.

Sample Code

The following code displays the current week of the year.

Var d As Date = Date.Now
MessageBox("Week: " + d.WeekOfYear.ToString)