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 date (date of the day defined on the current computer).
Notes:
  • This function is equivalent to DateSys.
  • WEBDEV - Server code The system date corresponds to the date of the day defined on the server.
Versions 15 and later
WINDEV MobileAndroid This function is now available for the Android applications.
New in version 15
WINDEV MobileAndroid This function is now available for the Android applications.
WINDEV MobileAndroid 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 = Today()   // Res = "20011225"
Res = DateToString(Today()) // Res = "25/12/2001"
Year = Left(Today(), 4)
// Year returns the current year (2001 for example)
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)Stored procedures
// Changes the system date and displays the new date
Today("20020101")
Info(Today())
Syntax

Finding out the system date Hide the details

<Result> = Today()
<Result>: Character string or Date variable
System date in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day).
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)Stored procedures

Modifying the system date Hide the details

Today(<New Date>)
<New Date>: Character string or Date variable
New system date in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day).
Remarks
  • To get the date in a format other than YYYYMMDD, the string must be formatted by DateToString, Right, Left, etc. The YYYYMMDD format was chosen because it allows you to check the chronology between two dates, while this would not be possible with a date in YYYYDDMM format or in YYMMDD format for example.
  • On all the current systems, the year of the system date can be included between 1980 and 2099.
  • Caution: To modify the system date, you must have the administrator rights on the current computer.
  • WEBDEV - Browser codeLinuxAndroidAndroid Widget iPhone/iPadJavaPHP In this version, Today is used to return the system date (today's date defined for the current computer or for the browser computer).
  • AndroidAndroid Widget iPhone/iPadWindows Mobile In simulation mode, the date of the PC is used. At run time, the date of the mobile device is used.
Related Examples:
Popup calendar Unit examples (WINDEV): Popup calendar
[ + ] Using a calendar that can be used by the OpenPopup function.
The PopCalendar window is very useful in the applications containing date controls.
Indeed, the PopCalendar window allows you to choose a date visually.
The risk of error is reduced as the user can see the day of the week corresponding to the selected date.
Then, the date control is filled with the value returned by the PopCalendar window.
The Calendar control Unit examples (WINDEV): The Calendar control
[ + ] Four methods for using the Calendar control:
- Using the Calendar control found in the WINDEV toolbar
- Using CalendarOpen and CalendarPicker as well as CalendarSelect (multi-selection)
- Using ..CalendarButton
- Using BankHolidayAdd
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