PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Converts a date to an integer. This integer corresponds to:
  • the number of days elapsed between January 1, 1800 and a specified date.
  • the number of days elapsed between January 1 of a given date and another specified date.
WEBDEV - Browser code In this version, you can only get the number of days elapsed between January 1, 1800 and the specified date.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for 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.
Versions 26 and later
Apple Watch This function is now available for Apple Watch applications.
New in version 26
Apple Watch This function is now available for Apple Watch applications.
Apple Watch This function is now available for Apple Watch applications.
Example
MyDate is Date
// Number of days elapsed between 01/01/1800 and 12/25/2001
MyDate = "20011225"
MyDate.ToInteger()   // Returns 73773
 
// Number of days elapsed between 01/01/1800 and 01/03/1800
MyDate = "18000103"
MyDate.ToInteger()   // Returns 3
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppWindows MobileJavaPHPAjaxUser code (UMC)Stored procedures
MyDate is Date
// Number of days elapsed between 01/01/2004 and 01/25/2004
MyDate = "20040125"
MyDate.ToInteger(True) // Returns 25
Syntax
<Result> = <Date>.ToInteger([<From beginning of year>])
<Result>: Integer
Number of days elapsed between:
  • January 1 of a given date and another specified date.
  • January 1, 1800 and a given date
<Date>: Date or DateTime variable
Date to convert. This date can correspond to:
  • a Date variable.
  • Versions 24 and later
    a DateTime variable. In this case, only the date is taken into account.
    New in version 24
    a DateTime variable. In this case, only the date is taken into account.
    a DateTime variable. In this case, only the date is taken into account.
<From beginning of year>: Optional boolean
  • True to get the number of days elapsed between January 1st of a given date and another specified date,
  • False (default value) to get the number of days elapsed 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 elapsed between January 1st 1800 and the specified date.
Remarks
  • The validity of the date passed as parameter is checked. An error message is displayed if the date is invalid. You can check the validity of a date using DateValid.
  • <Date type>.ToInteger and DateDifference can be used to calculate the number of days elapsed between two dates.
  • The date 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 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
Component : wd260std.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment