Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Parameters Date Field and Date Time

Many date/ time functions use arguments Date Field and Date Value - as described below:Date-time functions operate on date values and date-time values. 

Type
Description
DateA date.
DatetimeA date and time.

 The following date-time functions are available:

Page Tree
rootHELPTRUNKR:@self
excerpttrue

See Also

Arguments

Date-time functions can take arguments with the parameter types:

  • Date
  • Datetime

See Expression Basics.

Many date-time functions take the arguments dateField and dateValue, which are explained below.

Anchor
dateField
dateField

...

dateField

Date Field dateField can take one of the following values:

  • _YEAR
  • _MONTH
  • _DAY (equivalent to _DAY_OF_MONTH)
  • _DAY_OF_WEEK
  • _DAY_OF_MONTH
  • _DAY_OF_YEAR
  • _WEEK_OF_YEAR
  • _HOUR
  • _MINUTE
  • _SECOND
  • _MILLISECOND

Anchor
dateValue
dateValue

...

dateValue

Date Value dateValue can either be a Numbera number, representing a month or day, or a constant.

For example the following will , to add three months to the current date and time, use:

dateAdd(now(), _MONTH, 3)

Alternatively, dateValue can be one of the following constants.The constants are:

  • _MONDAY
  • _TUESDAY
  • _WEDNESDAY
  • _THURSDAY
  • _FRIDAY
  • _SATURDAY
  • _SUNDAY
  • _JANUARY
  • _FEBRUARY
  • _MARCH
  • _APRIL
  • _MAY
  • _JUNE
  • _JULY
  • _AUGUST
  • _SEPTEMBER
  • _OCTOBER
  • _NOVEMBER
  • _DECEMBER

For example, if you want to set the day to Sunday, you can writeuse:

dateSet(in.date, _DAY_OF_WEEK, _SUNDAY)

List of date/time functions

The following date/time functions are available:

dateAdd

dateDiff

dateGet

dateSet

 

                <Topic name = "getDayOfMonthAligned" helpContext = "attributeFunctions/getDayOfMonthAligned" isLeaf = "true"/>

                <Topic name = "getDayOfWeek" helpContext = "attributeFunctions/getDayOfWeek" isLeaf = "true"/>

                <Topic name = "getDayOfYear" helpContext = "attributeFunctions/getDayOfYear" isLeaf = "true"/>

                <Topic name = "getMonth" helpContext = "attributeFunctions/getMonth" isLeaf = "true"/>

                <Topic name = "getYear" helpContext = "attributeFunctions/getYear" isLeaf = "true"/>

                <Topic name = "now" helpContext = "attributeFunctions/now" isLeaf = "true"/>

                <Topic name = "removeTime" helpContext = "attributeFunctions/removeTime" isLeaf = "true"/>

                <Topic name = "timeToSecs" helpContext = "attributeFunctions/timeToSecs" isLeaf = "true"/>

                <Topic name = "today" helpContext = "attributeFunctions/today" isLeaf = "true"/>

                <Topic name = "toDate" helpContext = "attributeFunctions/toDate" isLeaf = "true"/>

                <Topic name = "toString" helpContext = "attributeFunctions/toString" isLeaf = "true"/>

See Also

...

Months and Days as Numbers

The numbers returned by data functions:

  • for the months are 1 for January through to 12 for December.
  • for the days are:
  1. Monday
  2. Tuesday
  3. Wednesday
  4. Thursday
  5. Friday
  6. Saturday
  7. Sunday

For example, the following returns 6, for Saturday:

dateGet("01/07/2017", _DAY_OF_WEEK) 

Note

When scheduling tasks, the days of the week are represented by different numbers.



Excerpt
hiddentrue

Functions which handle dates.