Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DateToStr and Delphi XE2

I upgraded one project from XE to XE2 and I noticed that DateToStr doesn't work exactly as before.

If I try to covert a null date to str it gives "Invalid floating point operation". While this was not there in XE.

Why there is this difference? Are there similar behaviours for other functions? (I mean some function that in a similar case = converting a null value changes the behaviour)

like image 467
LaBracca Avatar asked Dec 03 '25 16:12

LaBracca


1 Answers

After investigating I realized that this design choice made by Embarcadero in XE2 will affect a lot of old code. Wherever possible I replaced DateTimeToStr or I added checks for NULL dates before trying to convert to string.

Also DevExpress have some problems with their components because of this issue.

like image 150
LaBracca Avatar answered Dec 06 '25 07:12

LaBracca



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!