PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Range of dates
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..Time is used 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).
  • Modify the time in a Date item ("Date and Time" format).
Reminder: The Date items are used to manage:
  • the simple dates "Year - Month - Day" (YYYYMMDD format)
  • the dates and times "Year - Month - Day - Hours - Minutes - Seconds - Milliseconds" (YYYYMMDDHHMMSSLLL format)
  • the durations "Number of days - Number of hours - Number of minutes - Number of seconds - Number of milliseconds" (+DHHMMSSLLL format)
Example
// Operations performed on a DateTime variable
StartDate is DateTime = "200112121515"
EndTime is Time = "1530"
// Change the time
StartDate..Time = "153050"// Modify the Time part
StartDate..Time = EndTime
// Operations performed on a DateTime item
Work.StartDate = "200112121515"
Work.EndTime = "1530"
// Change the time
Work.StartDate..Time = "153050"// Modify the Time part
Work.StartDate..Time = Work.EndTime
Syntax
Reports and Queries

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 DateTime variable to use.
Reports and Queries

Modifying the time in a DateTime variable Hide the details

<DateTime variable>..Time = <New Time>
<DateTime variable>: DateTime
Name of DateTime variable to use.
<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 passed since midnight "00:00:00:00"
  • HHMM
  • HHMMSS
  • HHMMSSCC
  • HHMMSSLLL
(HH: hours, MM: minutes, SS: seconds, CC: hundredths of a second, LLL: thousandths of a second).

Finding out the time in a Date item (in "Date and Time" format) Hide the details

<Result> = <File Name>.<Item Name>..Time
<Result>: Character string or time
Time extracted from the DateTime variable.
<File Name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File Description type.
<Item Name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by the Item Description type.

Modifying the time in a Date item (in "Date and Time" format) Hide the details

<File Name>.<Item Name>..Time = <New Time>
<File Name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File Description type.
<Item Name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by 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 passed since midnight "00:00:00:00"
  • HHMM
  • HHMMSS
  • HHMMSSCC
  • HHMMSSLLL
(HH: hours, MM: minutes, SS: seconds, CC: hundredths of a second, LLL: thousandths of a second).
Remarks

Range of dates

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:
Calculations on durations 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
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment