[Lazarus] convert "Januar 2016" to TDateTime using StrToDate

Landmesser John jmlandmesser at gmx.de
Wed Aug 24 14:54:22 CEST 2016


sorry, lhelp knows the answer:

> StrToDate converts the string S to a TDateTime date value. The Date 
> must consist of 1 to three digits, separated by the DateSeparator 
> character. If two numbers are given, they are supposed to form the day 
> and month of the current year. If only one number is given, it is 
> supposed to represent the day of the current month. (This is not 
> supported in Delphi) 


Am 24.08.2016 um 14:33 schrieb Landmesser John:
> just curious: should be possible?
>
> StrToDate('Januar 2016','mmmm yyyy', '  ')
>
> but i get ConvertError
>
> Tipps are welcome
>
> Found a german hint in DelphiPraxis:
>
> die Format-Strings derUnitSysUtils sind eher auf die Ausgabe 
> gerichtet. Beim Parsen von Strings bist du abseits des unterst├╝tzten 
> Normalfalls (nur Zahlen und Trennzeichen) auf deine eigene Findigkeit 
> angewiesen.
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160824/04ffbf6e/attachment.html>


More information about the Lazarus mailing list