[fpc-pascal]DateTimeToStr function... bug?

hernan.et at pg.com hernan.et at pg.com
Fri Feb 28 00:19:43 CET 2003

Hi all,

1. units.pdf page 480 function DateTimeToStr
Statement says that this function returns the string equivalent of DateTime parameter using the ShortDateTimeFormat formatting.....
but it looks like ShortDateTimeFormat is not defined anywhere rather ShortDateFormat.
I assume this is a typo of the documentation. Can somebody please check?

2. Using
 ShortDateFormat := 'dddddd tt';

 gives a result of

 27 February 2003 23:09:52 23:09
 ^^^^^^^^^ok^^^^^ ^^^ok^^^ ^???^

 hour:minute is somewhat repeated but using this statement yields correct result

 mmGoods.Lines.Add(FormatDateTime('dddddd tt',Now));

 27 February 2003 23:12:22

 Is there a bug in DateTimeToStr subroutine????

fpc 1.0.7
Mandrake 9.1



More information about the fpc-pascal mailing list