Subject Re: [firebird-support] Invalid Argument to Date Encode
Author Svein Erling Tysvaer
ra8009 wrote:
> I have a user that was "cleaning the keyboard" and now my program
> throws "invalid argument to date encode" whenever she tries to run it.
> How do I get rid of it? Find the record and delete it?

Could it be that the user have changed the date format through the
control panel - either through changing the format itself or the
language (changing the language can change the date format as well)? If
your application uses something like StrToDate (as opposed to EncodeDate
- I'm speaking Delphi), then it could bark if you try to do e.g.
StrToDate('29.2.2008') when the format is mm.dd.yyyy.

Firebird accepts dates in certain set formats (the ones I can think of
is dd.mm.yyyy, mm/dd/yyyy, dd Mmm yyyy (a bit uncertain about this one)
and yyyy-mm-dd) and you cannot change this. As for storing the dates,
Firebird stores it as the number of days since a certain base date, and
I can't imagine it being possible to put something wrong in here.

Hence, I seriously doubt this error has anything to do with Firebird itself.

HTH,
Set