PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • YYYYMMDD format
  • Miscellaneous
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
Converts an integer into a date in YYYYMMDD format.
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
IntegerToDate(73773)       // Returns "20011225"
IntegerToDate(73773, "Y")  // Returns "2001"
IntegerToDate(73773, "M")  // Returns "12"
IntegerToDate(73773, "D")  // Returns "25"
 
// Calculate tomorrow's date
let Tomorrow = IntegerToDate(DateToInteger(DateSys()) + 1)
Syntax
<Result> = IntegerToDate(<Date> [, <Format>])
<Result>: Character string or Date variable
Date in YYYYMMDD format.
<Date>: Integer
Number of days elapsed since January 1st 1800 + 1 (January 1st 1800 is number 1).
<Format>: Optional character string
Format of the date to retrieve:
  • Y to retrieve the year in YYYY format,
  • M to retrieve the month in MM format,
  • D to retrieve the day in DD format.
If this parameter is not specified, the format used by default is YYYYMMDD (YYYY corresponds to the year, MM to the month and DD to the day).
Remarks

YYYYMMDD format

To get the date in a format other than YYYYMMDD, the string must be formatted using DateToString, Right, Left, etc.
The YYYYMMDD format was chosen because it allows you to check the order of dates. This would not be possible with a date in YYYYDDMM or DDMMYYYY format, for example.
WINDEVWindowsUniversal Windows 10 AppJavaUser code (UMC)Stored procedures

Miscellaneous

This function cannot be used to retrieve dates before October 14, 1582 (the change from the Julian to the Gregorian calendar will not be taken into account).
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