| [Overview][Constants][Procedures and functions][Index] | 
Encode a Year, Month, Day, Hour, minute, seconds, milliseconds tuplet to a TDateTime value
Source position: dateutil.inc line 306
| function TryEncodeDateTime( | 
| const AYear: Word; | 
| const AMonth: Word; | 
| const ADay: Word; | 
| const AHour: Word; | 
| const AMinute: Word; | 
| const ASecond: Word; | 
| const AMilliSecond: Word; | 
| out AValue: TDateTime | 
| ):Boolean; | 
| AYear | 
 | Year | 
| AMonth | 
 | Month in year | 
| ADay | 
 | Day in month | 
| AHour | 
 | Hour of the day | 
| AMinute | 
 | Minutes in the hour | 
| ASecond | 
 | Seconds in the minute | 
| AMilliSecond | 
 | Millisecond in the second | 
| AValue | 
 | Encoded TDateTime value. | 
True if the encoding was succesful
EncodeDateTime encodes the values AYearAMonth, ADay,AHour, AMinute,ASecond and AMilliSecond to a date/time valueand returns this value in AValue.
If the date was encoded succesfully, True is returned, False is returned if one of the arguments is not valid.
| 
 | Encodes a DateTime value from all its parts | |
| 
 | Encodes a year, month, week of month and day of week to a DateTime value | |
| 
 | Encode a TDateTime value from a year, week and day of week triplet | |
| 
 | Encodes a year and day of year to a DateTime value | |
| 
 | Encode a year and day of year to a TDateTime value | |
| 
 | Encode a year, week and day of week triplet to a TDateTime value | |
| 
 | Encode a year, month, week of month and day of week to a TDateTime value | 
Program Example79; { This program demonstrates the TryEncodeDateTime function } Uses SysUtils,DateUtils; Var Y,Mo,D,H,Mi,S,MS : Word; TS : TDateTime; Begin DecodeDateTime(Now,Y,Mo,D,H,Mi,S,MS); If TryEncodeDateTime(Y,Mo,D,H,Mi,S,MS,TS) then Writeln('Now is : ',DateTimeToStr(TS)) else Writeln('Wrong date/time indication'); End.