Contents...

Date/Time Functions

String GetTime(DateTime date)
Returns the time portion string for the given date.

DateTime SetTime(DateTime date, String time)
Sets the time portion of the given date.

DateTime SetDayOfMonth(DateTime date, Number day)
Sets the day of the month for the given date.

DateTime SetMonth(DateTime date, Number month)
Sets the month portion of the given date.

DateTime AddDays(DateTime dateTime, Number days)
Adds the given number of days to the given date, and returns a new date.

DateTime AddMonths(DateTime dateTime, Number months)
Adds the given number of months to the given date, and returns a new date.

DateTime AddMinutes(DateTime dateTime, Number mins)
Adds the given number of minutes to the given date, and returns a new date.

DateTime AddSeconds(DateTime dateTime, Number secs)
Adds the given number of seconds to the given date, and returns a new date.

DateTime Today()
Returns today's date, without a time portion.

DateTime UtcNow()
Returns the current UTC time.

DateTime DateOnly(DateTime date)
Returns the date-only portion of a date time value.

Boolean IsHoliday(String selectedHolidaySchedule, DateTime date, Boolean includeWeekends)
Returns true if the given date lies on a holiday, using the given holiday schedule link value. Optionally include weekends in this determination.

DateTime MaxDate()
Returns the maximum date that the system can hold.

DateTime MinDate()
Returns the minimum date that the system can hold.

DateTime NullDate()
Returns an empty date field.

Number Year(Any expr)
Returns the year portion of the given date value.

Number Month(Any expr)
Returns the month portion of the given date value.

Number Day(Any expr)
Returns the day of the month portion of the given date value.

Number DayOfWeekAsNumber(Any expr)
Returns the day of the week portion of the given date value.

Number DaysBetween(Any odate1, Any odate2)
Return the days between the two dates.

Number MonthsBetween(Any odate1, Any odate2)
Returns the months between the two dates.

Number SecondsBetween(Any odate1, Any odate2)
Returns the seconds between the two dates.

Number TicksBetween(Any odate1, Any odate2)
Returns the milliseconds between the two dates.

Number Hour(Any odate1)
Returns the hour portion of the given date.

Boolean ValidateTime(String time)
Validates that the given time string is a valid time.

String FormatHours(Any expr, String format)
Formats the given date value for display as hours. Currently the only format supported is "c", which returns for example "1d 1h 1m".

String FormatDate(Any expr, String format)
Formats the given date using the given standard date format string.

DateTime Date(Any expr)
Returns the date value of a given string value.

DateTime DateAndTime(Any expr)
Returns the date and time value of a given string value.

String DateStr(Any expr)
Converts the given date value into a string, using the default formatting.

DateTime Now()
Returns the current date and time.

Next Topic: Math Functions

Date/Time Functions - WorkflowFirst Customer Support Server, Version 1.0.749 (beta)
Up Since 11/16/2018 1:27:54 PM