Add Date Function Calls

Last update: Download PDF Edit

1 Introduction

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.

2 addMilliseconds

Add a number of milliseconds to a date.

2.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of milliseconds to be added Type: Integer

2.2 Output

A result of type DateTime that corresponds to the initial date plus x milliseconds.

3 addSeconds

Add a number of seconds to a date.

3.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of seconds to be added Type: Integer

3.2 Output

A result of type DateTime that corresponds to the initial date plus x seconds.

4 addMinutes

Add a number of minutes to a date.

4.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of minutes to be added Type: Integer

4.2 Output

A result of type DateTime that corresponds to the initial date plus x minutes.

5 addHours

Add a number of hours to a date.

5.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of hours to be added Type: Integer

5.2 Output

A result of type DateTime that corresponds to the initial date plus x hours.

6 addDays[UTC]

Add a number of days to a date. addDays uses the server’s calendar and addDaysUTC uses the UTC calendar.

6.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of days to be added Type: Integer

6.2 Output

A result of type DateTime that corresponds to the initial date plus x days.

7 addWeeks[UTC]

Add a number of weeks to a date. addWeeks uses the server’s calendar and addWeeksUTC uses the UTC calendar.

7.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of weeks to be added Type: Integer

7.2 Output

A result of type DateTime that corresponds to the initial date plus x weeks.

8 addMonths[UTC]

Add a number of months to a date. addMonths uses the server’s calendar and addMonthsUTC uses the UTC calendar.

8.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of months to be added Type: Integer

8.2 Output

A result of type DateTime that corresponds to the initial date plus x months.

9 addYears[UTC]

Add a number of years to a date. addYears uses the server’s calendar and addYearsUTC uses the UTC calendar.

9.1 Input Parameters

  • Initial date Type: DateTime
  • The amount of years to be added Type: Integer

9.2 Output

A result of type DateTime that corresponds to the initial date plus x years.