PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
..Date is used to:
  • Retrieve the date from a DateTime variable.
  • Modify the date in a DateTime variable.
  • Retrieve the date from a Date item (in "Date and Time" format).
    WEBDEV - Browser code Not available.
  • Modify the date in a Date item (in "Date and Time" format).
    WEBDEV - Browser code Not available.
Reminder: The Date items are used to manage:
  • the simple dates "Year - Month - Day" (YYYYMMDD format)
  • the dates and times "Year - Month - Day - Hours - Minutes - Seconds - Milliseconds" (YYYYMMDDHHMMSSLLL format)
  • the durations "Number of days - Number of hours - Number of minutes - Number of seconds - Number of milliseconds" (+DHHMMSSLLL format)
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
iPhone/iPad This property is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Versions 20 and later
WEBDEV - Browser code This property is now available in browser code for the DateTime variables.
New in version 20
WEBDEV - Browser code This property is now available in browser code for the DateTime variables.
WEBDEV - Browser code This property is now available in browser code for the DateTime variables.
Versions 21 and later
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Operations performed on a DateTime variable
StartDate is DateTime = "200112121515"
EndDate is Date = "20011209"
// Change the date
StartDate..Date = "20011225"
// Modify the Date part
StartDate..Date = EndDate
// Operations performed on a DateTime item
MyWork.StartDate = "200112121515"
MyWork.EndDate = "20011209"
// Change the date
MyWork.StartDate..Date = "20011225"
// Modify the Date part
MyWork.StartDate..Date = MyWork.EndDate
Syntax
WINDEVWEBDEV - Server codeWEBDEV - Browser codeReports and QueriesAndroidAndroid Widget iPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Finding out the date in a DateTime variable Hide the details

<Result> = <DateTime>..Date
<Result>: Date
Date extracted from the DateTime variable.
<DateTime>: DateTime
Name of the DateTime variable to use.
WINDEVWEBDEV - Server codeWEBDEV - Browser codeReports and QueriesAndroidAndroid Widget iPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Modifying the date in a DateTime variable Hide the details

<DateTime>..Date = <New Date>
<DateTime>: Date or DateTime
Name of the DateTime variable to use.
<New Date>: Character string or date or integer
New date in the following format:
  • YYYYMMDD
  • Integer: number of days passed between January 1st 1800 and the specified date.
Replaces the date in the specified variable.
WEBDEV - Browser code Not available in browser code

Finding out the date in a Date item (Date and Time format) Hide the details

<Result> = <File Name>.<Item Name>..Date
<Result>: Date
Date extracted from the item
<File Name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File Description type.
<Item Name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by the Item Description type.
WEBDEV - Browser code Not available in browser code

Modifying the date in a Date variable (Date and Time format) Hide the details

<File Name>.<Item Name>..Date = <New Date>
<File Name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File Description type.
<Item Name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by the Item Description type.
<New Date>: Character string or date or integer
New date in the following format:
  • YYYYMMDD
  • Integer: number of days passed between January 1st 1800 and the specified date.
Replaces the date in the specified date.
Remarks
The Date and DateTime types are used to manage the dates from 01/01/0001 to 31/12/9999.
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
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment