<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-02-05 silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-02-04 Marco van de Voort <span dir="ltr"><<a href="mailto:marcov@stack.nl" target="_blank">marcov@stack.nl</a>></span>:<div class="im"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>In our previous episode, silvioprog said:<br>
> Worked with:<br>
><br>
> var<br>
> t: TDateTime;<br>
> begin<br>
> t := StrToDateTime('2013-02-04 11:39:54');<br>
> end;<br>
><br>
> sorry, I forgot to use the function StrToDateTime. :S<br>
<br>
</div>Or use<br>
<br>
<a href="http://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html" target="_blank">http://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html</a></blockquote></div></div><div><br></div><div>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?</div>
<div><br></div><div>Thx Marco! :)</div></div></div></blockquote></div><div><br></div><div>It would be nice if you could:<br></div><div><br></div><div><div> if TryScanDateTime(datestring, datetime) then</div><div> raise EMyOwnExcept.Create('My own datetime exception message'); </div>
</div><div><br></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>