Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2018.10.21;
Скачать: CL | DM;

Вниз

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 вся ветка

Текущий архив: 2018.10.21;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.004 c
2-1472882501
RusSun
2016-09-03 09:01
2018.10.21
Как быстро узнать что в строке одни нули?


2-1473119810
Денис11998833
2016-09-06 02:56
2018.10.21
TPanel на потомке от TCustomControl


2-1472826405
hei
2016-09-02 17:26
2018.10.21
Property не читает значение поля


2-1473244823
валя
2016-09-07 13:40
2018.10.21
чтение запись строки из файла


2-1472651923
Анна
2016-08-31 16:58
2018.10.21
Удалилась БД