"For developers", "Server scripts", "Functions description", "Converting types", "DateTimeToMyChatStr".
Convert date/time value (double) into a text string of MyChat format; the delimiter is dots: "day.month.year.hours.minutes.seconds".
function DateTimeToMyChatStr(const dt: double): string;
Parameter |
Type |
Value |
---|---|---|
dt |
double |
real number — date and type. |
A text string in MyChat format that corresponds to transmitted date and time.
var
dt: double;
begin
dt := Now;
mLogScript(DateTimeToMyChatStr(dt), 'Now');
dt := IncDay(dt, 1);
mLogScript(DateTimeToMyChatStr(dt), 'Tomorrow');
end.
[12:28:13] (Log "DateTimeToMyChatStr"): [Now] 08.10.2019.12.28.13
[12:28:13] (Log "DateTimeToMyChatStr"): [Tomorrow] 09.10.2019.12.28.13
[12:28:13] (Run "DateTimeToMyChatStr"): Script operation time: 9 ms
[12:28:13] (Run "DateTimeToMyChatStr"): Script done successfully.