Format Date Time Action

Description

Converts a date and/or time into the specified format. Used to modify a date value to so that it matches a required format. For example, the application being Automated Workflow may require a date to be input in a specific format such as yyyy dd mm - this action would be used to modify the value accordingly.

Declaration

<AMTEXTFORMATDATETIME DATETIMEFORMAT="text" INCLUDEAMPM="yes/no" RETURNRESULT="text" ACTION="text" SPECIFIEDDATETIME="text" SPECIFIEDFORMAT="text" SPECIFIED12HOUR="yes/no" INCLUDEAMPM="yes/no" ADJUSTYEAR="number" ADJUSTMONTH="number" ADJUSTDAY="number" ADJUSTHOUR="number" ADJUSTMINUTE="number" ADJUSTSECOND="number">

Example

<AMVARIABLE NAME="thedate"></AMVARIABLE>
<AMTEXTFORMATDATETIME DATETIMEFORMAT="m/d/yyyy" 12HOURFORMAT="NO" RETURNRESULT="thedate" ADJUSTDAY="-1">
<AMMESSAGEBOX>yesterdays date was %thedate%</AMMESSAGEBOX>

General Tab

Parameters

Formatted date time: Displays the current format of the date and time.

Date time format: Specifies the format that should be used when the date is output. The following characters are used to create a date format:

y = year
m = month  
d = day
h = hour
n = minute
s = second
hh = leading zero (03)
h = no leading zero (3)

Text, Required
MARKUP: DATETIMEFORMAT="dd/mm/yyyy hh:nn:ss"

Populate variable with result: Specify an already existing variable name to be populated with the formatted date.

Text [variable name], Required
MARKUP: RESULTVARIABLE="varname"

12 hour format: Specifies whether hours of the day will be based on a 12 or 24 hour clock.

Yes/No, Optional - Default yes
MARKUP: SPECIFIED12HOUR="no"

Include AM/PM in result: Specifies whether an AM or PM indicator should be added to the end of the formatted date time value. This option is only available when "12 hour format" is specified.

Yes/No, Optional - Default no
MARKUP: INCLUDEAMPM="yes"

Advanced Tab Parameters

Action: Specifies the source of the date time value to be formatted. .  

  • current: The current date time will be used

  • specified: the specified date time will be used

  • prompt: at run time a dialog will be presented that will prompt the user to select a date/time

Text, Optional default (current)
MARKUP: ACTION="specified"

Use specified date time: Specifies the date time to format when Action is set to specified.

Text , Required if Action is set to specified
MARKUP: SPECIFIEDDATETIME="6/12/2005 1:42:40 PM"

Will be in the format: Specifies the format that should be applied when attempting to read the date in Specified Date Time.

Text , Required if Action is set to specified
MARKUP: SPECIFIEDFORMAT="dd/mm/yy hh:nn:ss"

Prompt message: Specifies the message that should be used on the date and/or time prompt dialog box.

Text , Required if Action is set to prompt
MARKUP: PROMPTMESSAGE="Please select the date"

Prompt type: Specifies whether the prompt dialog box should prompt for the date, the time, or both.

  • datetime: The user will be prompted for the date and the time

  • time: The user will be prompted for the time

  • date: The user will be prompted for the date

Text [options], Optional - default is "datetime"
MARKUP: PROMPTTYPE="date"

Adjust:

Year: Specifies the number of years the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTYEAR="-4"

Hour: Specifies the number of hours the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTHOUR="-4"

Month: Specifies the number of months the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTMONTH="-4"

Minute: Specifies the number of minutes the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTMINUTE="-4"

Day: Specifies the number of days the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTDAY="-4"

Second: Specifies the number of seconds the date should be adjusted. A positive or negative number may be used.

Number, Optional - default is "0"
MARKUP: ADJUSTSECOND="-4"