Difference between revisions of "DateTime.DayOfWeek"

From Xojo Documentation

(Created page with "N/A")
 
 
Line 1: Line 1:
N/A
+
{{PropertyBox
 +
| name=DayOfWeek
 +
| owner=[[DateTime]]
 +
| ownertype=class
 +
| scope=public
 +
| type=[[Integer]]
 +
| platform=all
 +
| readonly=yes
 +
| newinversion=2019r2
 +
}}
 +
{{Description
 +
|text = The day of the week as an integer: 1=Sunday, 7=Saturday. }}
 +
 
 +
==Sample Code==
 +
The following displays the current day of the week.
 +
<rbcode>
 +
Var d As DateTime = DateTime.Now
 +
Label1.Value = d.DayOfWeek.ToString
 +
</rbcode>

Latest revision as of 20:32, 8 August 2019

Read-Only Property (As Integer )
IntegerValue = aDateTime.DayOfWeek

New in 2019r2

Supported for all project types and targets.

The day of the week as an integer: 1=Sunday, 7=Saturday.

Sample Code

The following displays the current day of the week.

Var d As DateTime = DateTime.Now
Label1.Value = d.DayOfWeek.ToString