Bug in FormatDateTime with FPC 2.6.4? lazarus / 64-FPC development ---------------------------------------------------------------------- bonmario · 2015-06-03 13:56 Hi, i'm working on Windows, with FPC 2.6.4. This is my code: Code: [Select]  Memo1.Lines.Clear;   Memo1.Lines.Add(FormatDateTime('hh:nn:ss.zzz', Now()));   Memo1.Lines.Add(FormatDateTime('hh.nn.ss:zzz', Now()));   Memo1.Lines.Add(FormatDateTime('hh@nn@ss.zzz', Now())); This is the output: Code: [Select]15.56.01.109 15.56.01.109 15@56@01.109 Seems that FormatDateTime change the ":" with the ".". Hi, Mario ---------------------------------------------------------------------- wp · 2015-06-03 14:41 The colon in FormatDatetime is replaced by the TimeSeparator from the FormatSettings, that's by design and very useful when writing international applications. Therefore, if you need the colon in the time string set the TimeSeparator to ':', or use a quoted colon in the format string: Code: [Select]s := FormatDateTime('hh":"nn":"ss.zzz', Now()); ---------------------------------------------------------------------- bonmario · 2015-06-03 14:44 Ok. Thanks, Mario ---------------------------------------------------------------------- Zoran · 2015-06-03 21:38 This behaviour is documented here: http://www.freepascal.org/docs- html/rtl/sysutils/formatchars.html