Форум: "KOL";
Текущий архив: 2018.10.21;
Скачать: [xml.tar.bz2];
Внизtime difference Найти похожие ветки
← →
Boguslaw (2010-03-01 21:28) [0]How to compute how many hours/minutes/seconds are between two TDateTime in KOL ? Something is wrong.
I tried this code from Delphi but it works wrong:
dt := Now- dtStart;
f := frac(dt);
Hours := trunc(f*24);
Minutes := trunc(f*24*60)-Hours*60;
Seconds := trunc(f*24*60)-Hours*60-Minutes*60*60;
← →
Dufa © (2010-03-02 09:52) [1]//[TDateTime TYPE DEFINITION]
type
//TDateTime = Double; // well, it is already defined so in System.pas
{* Basic date and time type. Integer part represents year and days (as is,
i.e. 1-Jan-2000 is representing by value 730141, which is a number of
days from 1-Jan-0001 to 1-Jan-2000 inclusively). Fractional part is
representing hours, minutes, seconds and milliseconds of a day
proportionally (like in VCL TDateTime type, e.g. 0.5 = 12:00, 0.25 = 6:00,
etc.). }
← →
Vladimir Kladov © (2010-03-02 18:35) [2]What is dtStart? How it was calculated / obtained /... ?
Страницы: 1 вся ветка
Форум: "KOL";
Текущий архив: 2018.10.21;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.001 c