From Xojo Documentation

Read-Only Property (As String )
StringValue = aDate.SQLDate

Supported for all project types and targets.

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


This is an example for a SQL date: 2008-09-03

Sample Code

The following code displays the SQLDate value for the current date.

Var d As Date = Date.Now
Label1.Value = d.SQLDate