PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Different methods for handling the dates and times
  • Operation and validity of dates
  • Handling the dates and times found in the edit controls
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
Overview
WINDEV, WEBDEV and WINDEV Mobile propose several methods for handling the dates and times in your applications:
Versions 21 and later
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
Different methods for handling the dates and times
Depending on the type of operation performed on the dates and times, it may be more efficient to use the variables or the functions of WLanguage.
The WLanguage functions are recommended:
  • To format the dates and times and to perform the conversion operations (convert a date into an integer, ...).
  • To get information about the dates and times (validity of date or time, spell out the day, ...).
The use of variables is recommended:
  • To perform calculations on the dates and times (interval, calculation of duration, ...).
  • To extract part of the date or time (day, month, year, ...).

Operation and validity of dates

The storage format allows you to store dates from 01/01/0001 to 12/31/9999.
The calculations performed on dates by the WLanguage functions or by the WLanguage properties are accurate from January 1st 1583.
Handling the dates and times found in the edit controls
The values found in the edit controls can be handled by the 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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment