DateTime calculations

dreezdreez Member Posts: 68
Hi,

Is there any standard function that calculates the DateTime like CalcDate? I couldn't find anything useful, to be honest.

For example:
18.10.2022 00:30:00 - 1 hour = 17.10.2022 23:30:00

Best Answer

  • dreezdreez Member Posts: 68
    edited 2022-10-18 Answer ✓
    Okay.. I resolved my own question.
        procedure CalcDateTime(_DateTime: DateTime; Seconds: Integer): DateTime
        begin
            exit(_DateTime + Seconds * 1000);
        end;
    

    seems to work.

Answers

  • dreezdreez Member Posts: 68
    edited 2022-10-18 Answer ✓
    Okay.. I resolved my own question.
        procedure CalcDateTime(_DateTime: DateTime; Seconds: Integer): DateTime
        begin
            exit(_DateTime + Seconds * 1000);
        end;
    

    seems to work.
Sign In or Register to comment.