|
|
|
|
|
Time (Property) In french: PartieHeure
Available only with these kinds of connection
The Time property enables you to: - Retrieve the time from a DateTime variable.
- Modify the time in a DateTime variable.
- Retrieve the time from in a Date item (in "Date and Time" format).
Not available. - Modify the time in a Date item ("Date and Time" format).
Not available.
Reminder: Date items are used to handle: - 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"
EndTime is Time = "1530"
StartDate.Time = "153050"
StartDate.Time = EndTime
Work.StartDate = "200112121515"
Work.EndTime = "1530"
Work.StartDate.Time = "153050"
Work.StartDate.Time = Work.EndTime
Syntax
Finding out the time in a DateTime variable Hide the details
<Result> = <DateTime variable>.Time
<Result>: Character string or time Time extracted from the DateTime variable. <DateTime variable>: DateTime Name of the DateTime variable to be used.
Modifying the time in a DateTime variable Hide the details
<DateTime variable>.Time = <New time>
<DateTime variable>: DateTime Name of the DateTime variable to be used. <New time>: Character string or time or integer New time that replaces the time of the variable used.The time format can be: - Integer: Number of hundredths of a second elapsed since midnight ("00:00:00:00")
- HHMM
- HHMMSS
- HHMMSSCC
- HHMMSSCCC
(HH: hours, MM: minutes, SS: seconds, CC: hundredths of a second, CCC: thousandths of a second).
Finding out the time in a Date item (in "Date and Time" format) Hide the details
<Result> = <Data file>.<Item>.Time
<Result>: Character string or time Time extracted from the DateTime variable. <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 time in a Date item (in "Date and Time" format) Hide the details
<Data file>.<item>.Time = <New time>
<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 time>: Character string or time or integer New time that replaces the time of the item used. The time format can be:- Integer: Number of hundredths of a second elapsed since midnight ("00:00:00:00")
- HHMM
- HHMMSS
- HHMMSSCC
- HHMMSSCCC
(HH: hours, MM: minutes, SS: seconds, CC: hundredths of a second, CCC: thousandths of a second). Remarks The "Date" items (in "Date and Time" format) are used to manage the dates found between 01/01/0001 at 00:00 and 12/31/9999 at 23:59.
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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|