4D v16.3Date |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
Date
Date
The Date command evaluates dateString and returns a date. The dateString parameter format must follow either the ISO date format or the regional settings defined at the system level. ISO date format Note : Starting with 4D v14, it is recommended to use the "YYYY-MM-DDTHH:MM:SSZ" format, compliant with the ISO standard and allowing to express the time zone. Regional settings
This mechanism can be configured using the SET DEFAULT CENTURY command. If you pass an invalid date (such as "13/35/94" or "aa/12/94") in dateString, Date returns a null date (!00/00/00!). It is your responsibility to verify that dateString is a valid date. The following example uses a request box to prompt the user for a date. The string entered by the user is converted to a date and stored in the reqDate variable: vdRequestedDate:=Date(Request("Please enter the date:";String(Current date))) The following example returns the string "12/25/94" as a date: vdDate:=Date("12/25/94") Date evaluation based on a date in ISO format: $vtDateISO:="2013-06-05T20:00:00"
|
PROPERTIES
Product: 4D HISTORY
Created: < 4D v6 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||