Date.Constructor(Year as Integer, Month as Integer = 1, Day as Integer = 1, hour as Integer = 0, minute as Integer = 0, second as Integer = 0, GMTOffset as double)

From Xojo Documentation


Date.Constructor(Year as Integer, Month as Integer, Day as Integer, Hour as Integer, Minute as Integer, Second as Integer, GMTOffset as Double)

Introduced 2009r2

Sets the new date object to the passed Year, Month, Day, Hour, Minute, Second, and GMTOffset. Requires setting the GMT offset.

Sample Code

The following code sets the date/time value using the constructor and displays it in a Label.

Dim d As New Date(1956, 8, 13, 8, 23, 0, -7)
Label1.Text = d.SQLDateTime