Subject Re: [IBO] TIB_DATE
Author maralex1949
I need the date to be null and I did convert this from Paradox so
you are most likely correct that the date was somehow converted to
zero. I now have somewhere to look, thanks.


--- In, Helen Borrie <helebor@...> wrote:
> At 11:36 AM 25/09/2006, you wrote:
> >Hello:
> >
> >Is there a way to have the TIB_DATE control display nothing if the
> >underlying field contains is empty. The control displays
> Something in your configuration is telling Delphi that an "empty"
> date is zero. The date you are seeing is Delphi's "date zero"
> date. (IB/Firebird use a different date for "date zero").
> So - find out what is forcing your null date to be represented as
> zero, e.g. are you using COALESCE() to read this field from the
> database? Or somehow setting zero as a default?
> Note that, if your database has actually *stored* zero in a date
> field, it's probably due to using a bad tool for converting from a
> legacy Paradox or Access database, since the engine itself won't
> accept zero as input to a date/time type. Ideally, you want to
> rectify this by trying to set zero dates to null in a one-off
> operation, thus avoiding these peculiarities. Unknown dates
> be stored as null. If you have a non-nullable requirement for a
> date/time column, you must default it to an actual date/time value
> the required type, e.g. current_date or 'TODAY' for date types,
> current_timestamp or 'NOW' for timestamp, or some expression that
> give you an acceptable default.
> Helen