[fpc-devel] Behavior of conversion between vardate variants and string in fpc and delphi

Luiz Americo Pereira Camara luizmed at oi.com.br
Mon Apr 4 18:42:37 CEST 2011


On 4/4/2011 02:28, Sergei Gorelkin wrote:
>
> Unfortunately I don't have recent Delphi, but here are results of some 
> quick testing with Delphi 7:
>
> a) Only *assignment* Variant -> TDateTime is broken, explicit casting 
> (e.g. VarAsType(v, varDate)) works.
> b) Conversion is done using Windows API (in general, everything Delphi 
> can't or doesn't do itself, it passes on to Windows), having its pros 
> and cons:
>

Thanks for your test

Since the use of the os api would need system dependent code i'm in 
favor of using the shordateformat.

Luiz



More information about the fpc-devel mailing list