|
|
|
|
|
Date (Property) In french: Date
Available only with these kinds of connection
The Date property is used to: - Retrieve the date from a DateTime variable.
- Modify the date in a DateTime variable.
- Retrieve the date from a Date item (in "Date and Time" format).
- Modify the date in a Date item (in "Date and Time" format).
Reminder: Date items 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 DateTime = "200112121515"
EndDate is Date = "20011209"
StartDate.Date = "20011225"
StartDate.Date = EndDate
MyWork.StartDate = "200112121515"
MyWork.EndDate = "20011209"
MyWork.StartDate.Date = "20011225"
MyWork.StartDate.Date = MyWork.EndDate
Syntax
Finding out the date in a DateTime variable Hide the details
<Result> = <DateTime>.Date
<Result>: Date Date extracted from the DateTime variable. <DateTime>: DateTime Name of the DateTime variable to be used.
Modifying the date in a DateTime variable Hide the details
<DateTime>.Date = <New date>
<DateTime>: Date or DateTime Name of the DateTime variable to be used. <New date>: Character string or date or integer New date in the following format:- YYYYMMDD
- Integer: number of days passed between January 1st 1800 and the specified date.
Replaces the date in the specified variable.
Finding out the date in a Date item (Date and Time format) Hide the details
<Result> = <Data file>.<Item>.Date
<Result>: Date Date extracted from the item. <Data file>: Character string Name of the data file used. This name was defined in the data model editor or with the File Description type. <Item>: Character string Name of the item used. This name is defined in the data model editor or with the Item Description type.
Modifying the date in a Date variable (Date and Time format) Hide the details
<Data file>.<item>.Date = <New date>
<Data file>: Character string Name of the data file used. This name was defined in the data model editor or with the File Description type. <Item>: Character string Name of the item used. This name was defined in the data model editor or with the Item Description type. <New date>: Character string or date or integer New date in the following format:- YYYYMMDD
- Integer: number of days passed between January 1st 1800 and the specified date.
Replaces the date in the specified date. Remarks The Date and DateTime types are used to handle dates from 01/01/0001 to 12/31/9999.
Related Examples:
|
Unit examples (WINDEV): Calculations on durations
[ + ] Calculations on dates and times with the WLanguage functions: - Calculate the duration between two moments (dates and times) - Calculate a sum of durations - Calculate an average of durations
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|