Difference between revisions of "DateTime.DayOfYear"

From Xojo Documentation

 
Line 15: Line 15:
 
The following code displays the current day of the year.
 
The following code displays the current day of the year.
 
<rbcode>
 
<rbcode>
Var d As DateTime = Date.Now
+
Var d As DateTime = DateTime.Now
 
Label1.Value = d.DayOfYear.ToString
 
Label1.Value = d.DayOfYear.ToString
 
</rbcode>
 
</rbcode>

Latest revision as of 21:30, 8 August 2019

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

New in 2019r2

Supported for all project types and targets.

The number days into the year that the date falls on.

Sample Code

The following code displays the current day of the year.

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