From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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

New in 2019r2

Supported for all project types and targets.

The month number of the date.

Sample Code

The following code displays the current month:

Var d As DateTime = DateTime.Now
MonthLabel.Text = d.Month.ToString