PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Returns or modifies the system time (current time defined for the current computer).
Note: This function is identical to Now.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
Res = TimeSys()        // Res = "15332105"
Res = TimeToString(TimeSys())   // Res = "15:33:21:05"
CurrentTime = Left(TimeSys(), 4)  // CurrentTime = "1533"
WINDEVReports and QueriesWindows MobileUniversal Windows 10 AppUser code (UMC)
// Display the current time in the CurrentTime control

// -- Initialization code of a window/page
// Call the "Clock" procedure every second
TimerSys("Clock", 100, 1)
// -- Clock procedure
PROCÉDURE Clock()
CurrentTime = TimeToString(TimeSys())
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)
// Changes the system time and displays the new time
TimeSys("17280000")
Info(TimeSys())
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget Windows MobileUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)
TodaysDate is Date = DateSys()
EDT_EditDate = DateToDayInAlpha(TodaysDate) + " " + TodaysDate..Day + ...
" " + DateToMonthInAlpha(TodaysDate) + " at " + ...
TimeToString(TimeSys(), "HH:MM:SS")
// The EDT_EditDate control contains for example: Monday 20 August at 14:44:17
Syntax

Finding out the system time Hide the details

<Result> = TimeSys()
<Result>: Character string or Time variable
System time in HHMMSSCC format (HH corresponds to the hours, MM to the minutes, SS to the seconds and CC to the hundredths of a second).
WEBDEV - Browser code System time in HHMMSSCCC format (HH corresponds to the hours, MM to the minutes, SS to the seconds and CCC to the hundredths of a second).
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Modifying the system time Hide the details

TimeSys(<New Time>)
<New Time>: Character string or Time variable
New system time in HHMMSSCC format (HH corresponds to the hours, MM to the minutes, SS to the seconds and CC to the hundredths of a second).
Remarks
  • Caution: To modify the system time, you must have the administrator rights on the current computer.
  • To get the time in a format other than HHMMSSCC, the string must be formatted by DateToString, Right, Left, etc.
  • The HHMMSSCC format was chosen because it allows you to compare two times to the hundredth of a second.
  • Windows Mobile In Windows CE, the hundredths of a second are null in most cases (CC = 00).
  • WEBDEV - Server code The system time corresponds to the current time defined for the server.
  • WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadUniversal Windows 10 AppPHP In this version, TimeSys can only be used to return the system time (current time defined for the current computer or on the browser computer).
  • AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App In simulation mode, the time used is the time on the PC where the simulation is run. In real use, 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
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment