Mendix 7 is no longer supported unless you have Extended Support. Mendix 7 documentation will remain available until July 2024.
To upgrade to a supported version, see Moving from Desktop Modeler Version 7 to Studio Pro 8.
Add date function calls
Adding a time unit to a date. In all examples, the first input can be either a new dateTime (depicted in all examples), a variable of type DateTime, or an attribute of a domain entity of type DateTime.
addMilliseconds
Add a number of milliseconds to a date.
Input parameters
- Initial date Type: DateTime
- The amount of milliseconds to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x milliseconds.
|
|
results in a datetime that corresponds to
|
|
addSeconds
Add a number of seconds to a date.
Input parameters
- Initial date Type: DateTime
- The amount of seconds to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x seconds.
|
|
results in a datetime that corresponds to
|
|
addMinutes
Add a number of minutes to a date.
Input parameters
- Initial date Type: DateTime
- The amount of minutes to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x minutes.
|
|
results in a datetime that corresponds to
|
|
addHours
Add a number of hours to a date.
Input parameters
- Initial date Type: DateTime
- The amount of hours to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x hours.
|
|
results in a datetime that corresponds to
|
|
addDays[UTC]
Add a number of days to a date. addDays
uses the server’s calendar and addDaysUTC
uses the UTC calendar.
Input parameters
- Initial date Type: DateTime
- The amount of days to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x days.
|
|
results in a datetime that corresponds to
|
|
addWeeks[UTC]
Add a number of weeks to a date. addWeeks
uses the server’s calendar and addWeeksUTC
uses the UTC calendar.
Input parameters
- Initial date Type: DateTime
- The amount of weeks to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x weeks.
|
|
results in a datetime that corresponds to
|
|
addMonths[UTC]
Add a number of months to a date. addMonths
uses the server’s calendar and addMonthsUTC
uses the UTC calendar.
Input parameters
- Initial date Type: DateTime
- The amount of months to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x months.
|
|
results in a datetime that corresponds to
|
|
addYears[UTC]
Add a number of years to a date. addYears
uses the server’s calendar and addYearsUTC
uses the UTC calendar.
Input parameters
- Initial date Type: DateTime
- The amount of years to be added Type: Integer
Output
A result of type DateTime that corresponds to the initial date plus x years.
|
|
results in a datetime that corresponds to
|
|
It’s also possible to pass Long values to different Add date function calls:
|
|
results in a datetime that corresponds to
|
|