Hi,
i have a method for calculating dates. The date string is commited as a string, or as a date. If i commit the date as a string, i use SQLDateTime to convert it to a date variable. But the exception handling seems to be strange to me.
F.e. when i commit a date string like “2014-06-04 08:30:10” everything works fine. When i try to get it into an exception with “2014-06-04 27:30:10” the date variable will be: “2014-06-05 03:30:10”. The time of day “27:30” does not really exist, but SQLDateTime adds it to the next day. I have expected an UnsupportedFormatException.
Next example: If i commit a “xxx2014-06-04 08:30:10”, i get this date: “1601-01-04 8:30:10”. I have expected an exception again.
Is there a way to get the SQLDateTime crash with wrong dates?
Thanks
Carsten