ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Date and time functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns or modifies the system time (current time defined for the current computer).
Note: This function is identical to Now.
Example
Res = TimeSys()        // Res = "15332105"
Res = TimeToString(TimeSys())   // Res = "15:33:21:05"
HeureAct = Left(TimeSys(), 4)    // HeureAct = "1533"
AndroidAndroid Widget
DateAujourdhui is Date = DateSys()
SAI_SaisieDate = DateToDayInAlpha(DateAujourdhui) + " " + DateAujourdhui.Day + ...
	" " + DateToMonthInAlpha(DateAujourdhui) + " à " + ...
	TimeToString(TimeSys(), "HH:MM:SS")
// Le champ SAI_SaisieDate contient par exemple : Lundi 20 Août à 14:44:17
Syntax

Getting the system time Hide the details

<Result> = TimeSys()
<Result>: Character string or Time variable
System time in HHMMSSCC format (HH corresponds to hours, MM to minutes, SS to seconds and CC to hundredths of a second).
Remarks
  • Warning To change the system time, you must have administrator rights on the current workstation.
  • To get the time in a format other than HHMMSSCC, the string must be formatted using DateToString, Right, Left, etc.
  • The HHMMSSCC format was chosen because it allows you to compare two times with hundredths-of-a-second accuracy.
  • AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst In this version, TimeSys can only be used to return the system time (time on the current computer or on the computer on which the Internet browser is running).
  • AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst In simulation mode, the time used is the time on the PC where the simulation is run. At runtime, the time of the mobile device is used.
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
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help