PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
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
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: For system time management, this function is identical to the TimeSys function.
Example
Res = Now()        // Res = "15332105"
Res = TimeToString(Now())   // Res = "15:33:21:05"
HeureAct = Left(Now(), 4)    // HeureAct = "1533"
// Afficher l'heure actuelle dans le champ HeureActuelle
 
// -- Code d'initialisation d'une fenêtre/page
// Appeler toutes les secondes la procédure "Horloge"
TimerSys("Horloge", 100, 1)
// -- Procédure Horloge
PROCÉDURE Horloge()
HeureActuelle = TimeToString(Now())
Reports and QueriesStored procedures
// Change l'heure système et affiche la nouvelle heure
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.
Reports and QueriesStored 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 obtain the time in a format other than HHMMSSCC, you must format the string with the functions DateToString, Right, Left, etc.
  • The HHMMSSCC format was chosen because it allows you to compare two times with hundredths-of-a-second accuracy.
Business / UI classification: Neutral code
Component: wd270std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment