"For developers", "Server scripts", "Functions description", "Date and time","NoDate".

 

Get the value "no date and time" (no UTC correction). In MyChat, January 1, 1900 considered as starting point. It is a so-called constant "unspecified date".

 

Syntax

function NoDate: double;

 

Function result

JAnuaty 1, 1900, 0 hours, 0 minutes, 0 seconds.

 

Example

function GetDateTimeAsText(dt: double): string;
begin
  result := 'year: ' + FormatDateTime('yyyy', dt) + ', ' + 
            'month: ' + FormatDateTime('mm', dt) + ', ' +
            'day: ' + FormatDateTime('dd', dt) + ', ' +
            'time: ' + FormatDateTime('hh:nn:ss', dt);
end;
begin
  mLogScript(GetDateTimeAsText(Now), 'Now'); 
  mLogScript(GetDateTimeAsText(NoDate), 'NoDate constant'); 
end.

Script work result

[20:17:41] (Log "NoDate"): [Now] year: 2019, month: 10, day: 07, time: 20:17:41

[20:17:41] (Log "NoDate"): [NoDate constant] year: 1900, month: 01, day: 01, time: 00:00:00

[20:17:41] (Run "NoDate"): Script operation time: 4 ms

[20:17:41] (Run "NoDate"): Script operation time.

 

See also

FormatDateTime

mLogScript

Now