Date.SQLDateTime

From Xojo Documentation

Revision as of 21:47, 23 January 2019 by PLefebvre (talk | contribs)
Property (As String )
aDate.SQLDateTime = newStringValue
or
StringValue = aDate.SQLDateTime

Supported for all project types and targets.

Gets and sets the date in SQL date/time format, YYYY-MM-DD HH:MM:SS. Passing a bad string will result in an UnsupportedFormatException.

Notes

This is an example of an SQL date/time: 2008-09-03 13:39:16

Sample Code

The following code sets and displays the SQL date/time.

Dim d As New Date
d.SQLDateTime = "2011-09-03 08:13:32"

Label1.Text = d.SQLDateTime