PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Used to:
  • Return or modify the system time (current time defined for the current computer).
  • Versions 19 and later
    Initialize some Date, Time or DateTime elements of WLanguage.
    New in version 19
    Initialize some Date, Time or DateTime elements of WLanguage.
    Initialize some Date, Time or DateTime elements of WLanguage.
Remarks: When managing the system time, this function is identical to TimeSys.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for 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.
Versions 26 and later
Apple Watch This function is now available for Apple Watch applications.
New in version 26
Apple Watch This function is now available for Apple Watch applications.
Apple Watch This function is now available for Apple Watch applications.
Example
Res = Now()        // Res = "15332105"
Res = TimeToString(Now())   // Res = "15:33:21:05"
CurrentTime = Left(Now(), 4)    // CurrentTime = "1533"
// 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(Now())
Windows MobileUser code (UMC)AjaxStored procedures
// Changes the system time and displays the new time
Now("17280000")
Info(Now())
Syntax

Finding out the system time and initializing a WLanguage element with the system time Hide the details

<Element> = Now()
<Element>: Character string or type corresponding to the element
The result of the function changes depending on how the function is used. Element to initialize. This element can correspond to:
  • a character string. It will contain the system time in HHMMSSCC format (HH corresponds to hours, MM to minutes, SS to seconds and CC to hundredths of a second).
  • a Date, Time or DateTime variable.
  • a Date, Time or DateTime item.
  • an edit control or a Date, Time or DateTime column.
  • an attribute of a Looper control associated with the Value property of an Edit control or a Date, Time or DateTime column.
In this case:
  • the Date elements will be initialized with the system date.
  • the Time elements will be initialized with the system time.
  • the DateTime elements will be initialized with the system date and time.
Windows MobileUser code (UMC)AjaxStored procedures

Modifying the system time Hide the details

Now(<New time>)
<New time>: Character string or Time variable
New system time in HHMMSSCC format (HH corresponds to hours, MM to minutes, SS to seconds and CC to 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 using DateToString, Right, Left, etc.
  • The HHMMSSCC format was chosen because it allows you to compare two times with hundredths-of-a-second accuracy.
  • Windows Mobile In Windows CE, the hundredths of a second are null in most cases (CC = 00).
  • Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple WatchJavaPHP In this version, Now can only be used to return the system time of the current computer (or the one defined for the browser computer).
  • Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple WatchJava 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.
Business / UI classification: Neutral code
Component: wd260std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Pegar Hora - Now
Exemplo Pegar Hora - Now

gn_timer=TimerSys("hora",100,1)

//

PROCEDURE hora()
EDT_Time=Now()

//

EndTimerSys(gn_timer)

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/07/curso-windev-datas-012-now.html
https://www.youtube.com/watch?v=9vuYUPet3g0
De matos AMARILDO
25 Jul. 2016