2014-02-05 silvioprog <[email protected]>:
> 2014-02-04 Marco van de Voort <[email protected]>:
>
> In our previous episode, silvioprog said:
>> > Worked with:
>> >
>> > var
>> > t: TDateTime;
>> > begin
>> > t := StrToDateTime('2013-02-04 11:39:54');
>> > end;
>> >
>> > sorry, I forgot to use the function StrToDateTime. :S
>>
>> Or use
>>
>> http://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html
>
>
> Very nice option, I did not know this function. It would be better (or
> fast) that the SysUtils date funcs? For example, in my new units, would be
> better to use ScanDateTime instead of StrToDateTime?
>
> Thx Marco! :)
>
It would be nice if you could:
if TryScanDateTime(datestring, datetime) then
raise EMyOwnExcept.Create('My own datetime exception message');
--
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal