ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Date and time functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Converts a time to an integer. This integer corresponds to the number of hundredths of a second elapsed between <Time> and 00 hours 00 minutes 00 seconds and 00 hundredths of a second.
Example
// Wait 4 seconds
Start, t are int
Start = TimeToInteger(TimeSys())
LOOP
t = TimeToInteger(TimeSys()) - Start
// Display the time elapsed between 0 and 4s
Trace(IntegerToTime(t))
// Exit if the 4 seconds have elapsed
IF t > 400 THEN BREAK
END
Syntax
<Result> = TimeToInteger(<Time>)
<Result>: Integer
  • Number of hundredths of a second elapsed between <Hour> and 00 hours 00 minutes 00 seconds and 00 hundredths of a second,
  • 0 if an error occurs.
<Time>: Character string, Date or DateTime variable
Time to convert. This time can correspond to:
  • a character string in HHMMSSCC format (HH corresponds to hours, MM to minutes, SS to seconds and CC to hundredths of a second).
  • a character string in YYYYMMDDHHmmSSCC format (YYYY corresponds to the year, MM to the month, DD to the day, HH to hours, mm to minutes, SS to seconds and CC to hundredths of a second). In this case, only the time is taken into account.
  • a Time variable.
  • a DateTime variable. In this case, only the time is taken into account.
The function returns 0 if this parameter correspond an empty string ("").
Remarks
  • The time validity passed as parameter is checked. An error message is displayed if the time is invalid.
  • TimeToInteger and TimeDifference can be used to calculate the number of hundredths of a second elapsed between two dates.
  • Midnight corresponds to 00 hours, 00 minutes, 00 seconds and 00 hundredths of a second.
Business / UI classification: Neutral code
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help