I am doing something wrong? When I encode the date and time then for SecondsBetween I get 59 instead of 60 and for MilliSecondsBetween also. When I encode only time then for SecondsBetween I get correct answer 60.
Free Pascal Compiler version 2.6.2 [2013/02/12] for i386 Target: GO32 v2, i386 Results from dt.pp: ShortDateFormat=d/m/y LongDateFormat=dd" "mmmm" "yyyy ShortTimeFormat=hh:nn LongTimeFormat=hh:nn:ss Encode date and time: DateTime DT1= 28.05.2013 15:26:01:0 DateTime DT2= 28.05.2013 15:27:01:0 Between DT2-DT1= 0.0:0:59:59999 Encode time only: DateTime DT1= 30.12.1899 15:26:01:0 DateTime DT2= 30.12.1899 15:27:01:0 Between DT2-DT1= 0.0:1:60:60000 Btw. FormatDateTime('dd.mm.yyyy hh:nn:ss:z',DT1)); the result is the same with the use 'mm' instead of 'nn' for minutes: FormatDateTime('dd.mm.yyyy hh:mm:ss:z',DT1)); Lubomir Cabla
dt.pp
Description: Binary data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal