When debugging your scripts, it is important to obtain some intermediate results to make sure the written program works correctly. You can record the protocols into the text file or output the text directly to the editor console:
procedure mLogScript(sMsg, sTag: string);
Parameter |
Type |
Value |
---|---|---|
sMsg |
string |
text message that you need to output into the console log of the script editor; |
sTag |
string |
text tag (can be empty). |
var
s: string;
dt: double;
begin
s := '{"Value" : "17.10.1990.18.36.54"}'; // date/time format: dd.mm.yyyy.hh.mm.ss
// (day, month, year, hours, minutes, seconds)
if JSONGetDateTime(s, 'Value', dt) = 0 then begin
mLogScript(FormatDateTime('mmmm yyyy, number: d, a day of the week: dddd', dt), 'Date&Time test');
end;
end.
[15:26:42] (Log "test"): [Date&Time test] October 1990, number: 17, day of the week: Wednesday