Icon EncodeDateTime

Unit: Internal

Available In: Client and Server Applications

function EncodeDateTime(Year: Integer; Month: Integer; Day: Integer;
                        Hour: Integer; Minute: Integer; Second: Integer;
                        MSecond: Integer; UTC: Boolean=False): Integer

The EncodeDateTime function returns the local or UTC date and time from the year, month, day, hour, minute, second, and millisecond input parameters. The return value is a DateTime value.

Examples

X := DateTimeToStr(EncodeDateTime(2012,2,13,12,10,0,0)); // X is '2/13/2012
                                                                 // 12:10 PM'
Image