Script Date and Time Functions
The Automation Engine scripting language provides various elements that allow you to retrieve, define and modify dates and times in your scripts.
Date Calculations
-
ADD_DAYS
Adds days to a given date -
SUB_DAYS
Subtracts days from a given date -
ADD_PERIOD
Adds a period to a given date -
SUB_PERIOD
Subtracts a period from a given date -
CALE_LOOK_AHEAD
Returns the next date based on calendar conditions -
DIFF_DATE
Returns the difference in days between two dates -
FIRST_OF_PERIOD
Returns the first day of the period for a given date -
LAST_OF_PERIOD
Returns the last day of the period for a given date
Time Calculations
-
ADD_TIME
Adds two times -
SUB_TIME
Subtracts a time from another time -
ADD_TIMESTAMP
Adds time to a timestamp -
SUB_TIMESTAMP
Subtracts time from a timestamp -
DIFF_TIME
Returns the difference in time between two times
Return System Dates and Times
-
SYS_DATE
Returns the current date at the beginning of script processing -
SYS_DATE_PHYSICAL
Returns the current date -
SYS_LDATE
Returns the logical date -
SYS_TIME
Returns the current time at the beginning of script processing -
SYS_TIME_PHYSICAL
Returns the current time of day -
SYS_TIMESTAMP_PHYSICAL
Returns the current date and time
Convert Dates and Formats
-
CONV_DATE
Converts a date to another date format -
CONV_TIMESTAMP
Converts a date and time for use in another time zone -
DAY_OF_YEAR
Returns the day of the year for a date -
WEEK_NR
Returns the calendar week for a date -
WEEKDAY_NR
Returns the day of the week for date as a number -
WEEKDAY_XX
Returns the day of the week for a date as an abbreviation -
YEAR_9999
Extracts the year from a given date
Validate Dates and Times
-
VALID_CALE
Checks if a date is included in a Calendar Event -
VALID_DATE
Checks if a date is valid -
VALID_TIME
Checks if a time is valid
See also: