DateTime

 

 

 

DateTime

 

Description

Provides date time formatting and offsets for a supplied date or the current date.

 

Arguments

1.DateTime - 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.Input Format String - A string that represents the format of the source date time string.

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

5.Offset Amount - Number of units used to offset the current date. If not supplied the date is not offset.

6.Offset Type - {Second, Minute, Hour, Day, Week, Month, Quarter, Year} If not supplied, the offset type is Day.

 

Examples

[DateTime]

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

 

[DateTime|Yesterday]

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

 

[DateTime|||yyyyMMdd]

Returns the current date time with the four-digit year, two-digit month, and two-digit day.

 

[DateTime|3/8/11|M/d/yy|yyyy-MM-dd]

Returns 2011-03-08.  Note that this date will not parse without supplying an input format.

 

[DateTime|||MM/dd/yy|7]

Returns the date a week from today with the two-digit month, day, and year separated by slashes.

 

[DateTime|||dd-MM-yyyy|-1|Month]

Returns todays date from last month with the two-digit day, two-digit month and four-digit year separated by dashes.

 

[DateTime|[Copy|TransactionDate]|||-1|Year]

Returns the transaction date with the previous year in the macro's default format.

 

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.