[fpc-pascal] How to use StrToDateTime() to convert a string with no delimiters?

Michael Van Canneyt michael at freepascal.org
Tue Apr 25 08:25:01 CEST 2023



On Mon, 24 Apr 2023, Thomas Kurz via fpc-pascal wrote:

> I always use ScanDateTime for such purposes:
>
> https://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html
>
> You can explicitly define the pattern.

Correct. This is the only correct way to do this.

StrToDateTime is very limited in what it accepts.

Michael.


More information about the fpc-pascal mailing list