From Xojo Documentation

Revision as of 21:24, 12 August 2019 by Gperlman (talk | contribs)

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

Supported for all project types and targets.

Reports the date in the user's short date format as a string based on the user's locale and formatting even if the user's locale is a Unicode-only locale.


For example (US format): 12/31/97. The ShortDate format uses the Short format on both Windows and Mac. Changing this format changes the format that the ShortDate property uses.

Sample Code

The following code displays today's date in the ShortDate format.

Dim d As New Date
Label1.Text = d.ShortDate