DateTime.Now.ISOString

.ISOString property converts the date portion of the DateTime object into a string and returns it. The string will be in the following format: YYYY-MM-DD

Applies To

Properties and Methods

None

Available

The .ISOString property is available in:

  • 15.03.016
  • All newer builds

Type

String

Syntax

DateTime.Now.ISOString;

Parameters

None

Example

var ldToday = DateTime.Today;

var ldNow = DateTime.Now;

var ldNew = new DateTime('06/10/2021 12:34:56');

Event.Form.MessageBox('Get the .ISOString property:' +

'\nldToday: ' + ldToday.ISOString +

'\nldNow: ' + ldNow.ISOString +

'\nldNew: ' + ldNew.ISOString);

 

/* Expected Prompt response:

Get the .ISOString property:

ldToday: 2021-10-25

ldNow: 2021-10-25

ldNew: 2021-06-10

*/