MyChat Scripts Engine: EncodeDateTime
Function to calculate the date/time value from the year, month, day, hour, minute, second and millisecond values.
Syntax
function EncodeDateTime(wYear, wMonth, wDay, wHour, wMinute, wSecond, wMilliSec: word): double;
Parameters and return values
Parameter |
Type |
Value |
wYear |
word |
year value; |
wMonth |
word |
month value; |
wDay |
word |
day value; |
wHour |
word |
hours value; |
wMinute |
word |
minutes value; |
wSecond |
word |
seconds value; |
wMilliSec |
word |
milliseconds value. |
Function result
Date and time value that represent the specified year, month, day, hour, minute, second, millisecond parameters.
Example
var
dt: double;
begin
dt := EncodeDateTime(1979, 10, 9, 17, 54, 36, 769);
mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss:zzz', dt), '');
end.
Script work result
[17:32:57] (Log "EncodeDateTime"): 09.10.1979 17:54:36:769
[17:32:57] (Log "EncodeDateTime"):Script operation time: 5 ms
[17:32:57] (Log "EncodeDateTime"): Script done successfully.
See also
Created with the Personal Edition of HelpNDoc: Transform your help documentation into a stunning website