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
Checks the time validity.
Example
TimeValid("23122222")  // Returns True
TimeValid("2312")      // Returns True
TimeValid("23")        // Returns True
TimeValid("24")        // Returns False
TimeValid("23137099")  // Returns False
Syntax
<Result> = TimeValid(<Time>)
<Result>: Boolean
  • True if the time is valid or the <Time> parameter corresponds to an empty string (""),
  • False if the time is invalid. A time is considered invalid if:
    • "HH" is not between "00" and "23".
    • "MM" is not between "00" and "59".
    • "SS" is not between "00" and "59".
    • "CC" is not between "00" and "99".
<Time>: Character string, Date or DateTime variable
Time to use. 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.
Remarks
Tip: To enter a time in the correct format, use a Time Edit control. In this case, the validity of the time is automatically checked.
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