|
|
|
|
|
- Operators available for the years
- Leap years
- Calculations on dates
Year (Property) In french: Année
Available only with these kinds of connection
The Year property is used to: Remark: The Year property is used to easily change dates: add a year, etc. Reminder: Date items and variables are used to manage: - simple dates: "Year - Month - Day" (YYYYMMDD format).
- dates and times: "Year - Month - Day - Hours - Minutes - Seconds - Milliseconds" (YYYYMMDDHHmmSSCCC format).
- durations: "Number of days - Number of hours - Number of minutes - Number of seconds - Number of milliseconds" (+DHHMMSSCCC format).
StartDate is Date = DateSys()
StartDate.Year++
StartDate.Year = 2003
Syntax
Getting the year of a Date or DateTime variable or item Hide the details
<Result> = <Date>.Year
<Result>: Integer 4-digit year. <Date>: Date or DateTime Name of the Date or DateTime variable or item to be used.
Changing the year of a Date or DateTime variable or item Hide the details
<Date>.Year = <New year>
<Date>: Date or DateTime Name of the Date or DateTime variable or item to be used <New year>: Integer or character string New year in digits (between 1 and 9999). Replaces the year of the specified date. Remarks Operators available for the years The following arithmetic operators can be used with the Year property:
StartDate is Date = "20231212"
StartDate.Year++
StartDate.Year+=5
StartDate.Year-=5
Leap years If the date handled corresponds to February 29 of a leap year, adding or subtracting a year also changes the day. For example:
StartDate is Date = "20230229"
StartDate.Year++
Calculations on dates The date storage format allows you to store dates from 01/01/0001 to 12/31/9999.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|