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
Transforms a date into an integer. This integer corresponds to:
  • the number of days between January 1st 1800 and the specified date.
  • the number of days between January 1st of the specified date and the specified date.
WEBDEV - Browser code In this version, you can only find out the number of days passed between January 1st 1800 and the specified date.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android 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.
WINDEVUniversal 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.
WINDEVUniversal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
WINDEVUniversal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
WINDEVUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
WINDEVUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Number of days passed between 01/01/1800 and 25/12/2001
DateToInteger("20011225")   // Returns 73773

// Number of days passed between 01/01/1800 and 03/01/1800
DateToInteger("18000103")   // Returns 3
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)Stored procedures
// Number of days passed between 01/01/2004 and 25/01/2004
DateToInteger("20040125", True) // Returns 25
Syntax
<Result> = DateToInteger(<Date> [, <From Beginning of Year>])
<Result>: Integer
Number identifying the date.
<Date>: Character string or Date variable
Date to convert to YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day).
<From Beginning of Year>: Optional boolean
  • True to get the number of days passed between January 1st of the specified date and the specified date,
  • False (default value) to get the number of days passed between January 1st 1800 and the specified date.
WEBDEV - Browser code This syntax is not available in this version. <Result> corresponds to the number of days passed between January 1st 1800 and the specified date.
Remarks
  • The validity of the date passed in parameter is checked. An error message is displayed if the date is invalid. The validity of a date can be checked by DateValid.
  • DateToInteger can be used to calculate the number of days passed between two dates. You also have the ability to use DateDifference.
  • 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.
Related Examples:
WD Evaluation period Training (WINDEV): WD Evaluation period
[ + ] This example explains how to limit the use of an application to a given period (evaluation period).
The following topics are presented in this example:
1/ the protection of an application for a given duration
2/ the management of the registry

Summary of the example supplied with WINDEV:
When this example is started for the first time, it is activated for an evaluation period set to 5 days.
The information regarding the date when it was first started is stored in the registry and a control key is used to check whether this date was not modified by the end user. At the end of the evaluation period, the application is locked, unless the end user provides the code for unlocking the application
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