DateFormat

 

 

 

DateFormat

 

Description

Formats a date value using a custom format string.

 

Arguments

1.DateFormat - Name of the Macro.

2.Date Time String - A string representing the date time to use for the macro. If blank or not supplied, the current date is used.  Additionally, the words Today, Tomorrow, Yesterday, and Now can also be used.

3.Output Format String - A string used to format the date. If not supplied yyyy-MM-ddTHH:mm:ss.fffffffK is used.

4.Input Format String - A string that represents the format of the source date time string - only necessary when the date provided is not in a standard format.

 

Examples

[DateFormat]

Returns the current date time in the macro's default format.

 

[DateFormat|Yesterday]

Returns yesterday's date (without time) in the macro's default format.

 

[DateFormat|1-Jan-2000]

Returns the date 1-Jan-2000 in the macro's default format.

 

[DateFormat||yyyy]

Returns four-digit year of the current date time.

 

[DateFormat|01021923|yyyy|ddMMyyyy]

Returns four-digit year from the date 1-Feb-1923.

 

Notes

For a complete list of formatting options see the Date and Time Format Strings topic elsewhere in help.

 


Copyright © 2024 pasUNITY, Inc.

 

Send comments on this topic.