PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Calculation mode
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
RealToDateTime (Function)
In French: RéelVersDateHeure
Converts an 8-byte real into a date and time. This real corresponds to:
  • the day number from January 1st 1900 (compatible with Excel, starts from 1)
  • the day number from January 1st 1904 (compatible with Excel with the option "Use the calendar from 1904", starts from 0).
Note: The option "Use the calendar from 1904" can be configured in the advanced options of MS Excel. In Open Office, this option is available in the options of Open Office Calc ("Calculate" item).
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
// Displays "19000103060000000"
Info(RealToDateTime(3.25))
Syntax
<Result> = RealToDateTime(<Value> [, <From 1904>])
<Result>: DateTime variable or character string
Value of the date and time. Can correspond to:
  • a DateTime variable.
  • a character string in YYYYMMDDHHMMSSLLL format (YYYY corresponds to the year, MM to the month, DD to the day, HH to the hour, MM to the minutes, SS to the seconds and LLL to the milliseconds).
  • an empty string ("") if an error occurred.
<Value>: Real
Value to convert.
<From 1904>: Optional boolean
Calculation mode:
  • True if the date is calculated from 1904.
  • False (default value) if the date is calculated from 1900.
Remarks

Calculation mode

The integer part of the real gives the day number of the date part of the result:
  • the numbering starts from 1 for 01/01/1900
  • the numbering starts from 0 for 01/01/1904 if <From 1904> is set to True.
The decimal part gives the day fraction of the time part of the result (for example, 0.25 gives a time part "060000000").
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Linux wd230std.so
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment