Subject | Re: [firebird-support] NULL Date values |
---|---|
Author | Martijn Tonies |
Post date | 2007-09-10T16:01:15Z |
Hi,
The function from the library should be fixed.
Perhaps you could use a COALESCE(MyColumn, DateToStr(MyColumn), '')
to work around the display problem?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have experience with non-SQL databases. I am currently working onNULL is "empty", it doesn't get more empty than that.
> a web application and have run into a problem that happens when the
> user does not supply a date and NULL is stored to FB.
>
> Last night, I installed rFunc and used DateToStr which properly
> converts the date value to a string format, but if the date value is
> NULL, the string value returned is 11.17.4294967254!
>
> I don't know what that value is supposed to mean and I am surprised
> that the DateToStr function does not test for NULL and return an
> empty string whenever a NULL date is recieved.
>
> This leads me to believe that maybe I should be storing an empty
> value into a date field when the date is unknown. Is there a way to
> store an 'empty' date value in FB2 instead of NULL?
The function from the library should be fixed.
Perhaps you could use a COALESCE(MyColumn, DateToStr(MyColumn), '')
to work around the display problem?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com