ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Date and time functions
  • Overview
  • Different methods for managing dates and times
  • Date management and validity
  • Manipulating dates and times in Edit controls
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
Overview
WINDEV, WEBDEV and WINDEV Mobile propose several methods for managing dates and times in your applications:
Different methods for managing dates and times
Depending on the type of operation performed on the dates and times, it may be more efficient to use WLanguage variables or functions.
The WLanguage functions are recommended:
  • To format dates and times and perform conversion operations (convert a date to an integer, etc.).
  • To get information about dates and times (date or time validity, get name of a week day, etc.).
The use of variables is recommended:
  • To perform calculations on dates and times (differences, calculation of duration, etc.).
  • To extract part of the date or time (day, month, year, etc.).

Date management and validity

The date storage format allows you to store dates from 01/01/0001 to 12/31/9999.
WLanguage functions and WLanguage properties make accurate calculations on dates from January 1st, 1583.
Manipulating dates and times in Edit controls
The values in the Edit controls can be managed with Date or Time variables.
To do so, assign the control content to the variable.
StartDate is Date
// Assign the content of the control to the variable
StartDate = EDT_DateControl
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
Management of dates Unit examples (WINDEV): Management of dates
[ + ] Using the Date type of WLanguage and the functions for handling dates.
Management of dates Unit examples (WINDEV Mobile): Management of dates
[ + ] Using the Date type and the WLanguage functions for handling dates.
Management of dates Unit examples (WEBDEV): Management of dates
[ + ] This example presents the use of the Date type of WLanguage and the use of the functions for handling the dates.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/06/2024

Send a report | Local help