ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Time and date management properties
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
The Date property 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 codePHP Not available.
  • Modify the date in a Date item (in "Date and Time" format).
    WEBDEV - Browser codePHP Not available.
Reminder: Date items are used to manage:
  • simple dates: "Year - Month - Day" (YYYYMMDD format)
  • dates and times: "Year - Month - Day - Hours - Minutes - Seconds - Milliseconds" (YYYYMMDDHHmmSSCCC format)
  • durations: "Number of days - Number of hours - Number of minutes - Number of seconds - Number of milliseconds" (+DHHMMSSCCC format)
Example
// Manipulations d'une variable de type DateHeure
DateDébut is DateTime = "200112121515"
DateFin is Date = "20011209"
// Changer la date
DateDébut.Date = "20011225"
// Modifier la partie Date
DateDébut.Date = DateFin
// Manipulations d'une rubrique de type DateHeure
MonTravail.DateDébut = "200112121515"
MonTravail.DateFin = "20011209"
// Changer la date
MonTravail.DateDébut.PartieDate = "20011225"
// Modifier la partie Date
MonTravail.DateDébut.PartieDate = MonTravail.DateFin
Syntax

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 be used.

Modifying the date in a DateTime variable Hide the details

<DateTime>.Date = <New date>
<DateTime>: Date or DateTime
Name of the DateTime variable to be used.
<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 codePHP Not available in browser code and in PHP

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

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

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

<Data file>.<item>.Date = <New date>
<Data file>: Character string
Name of the data file used. This name was defined in the data model editor or with the File Description type.
<Item>: Character string
Name of the item used. This name was defined in the data model editor or with 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 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

Last update: 06/23/2023

Send a report | Local help