Subject Re: [IBO] Re: TIB_DateTimePicker Selecting time
Author Helen Borrie
At 10:01 AM 1/07/2004 +0000, you wrote:
>--- In, "bamber12001" <Gary@S...> wrote:
> > Hi all,
> >
> > I have been struggling to get the DateTimePicker component to work
> > properly. I can use it to store/edit dates fine, but I am unable
> > get it to work for times.
> >
> > My database stores the date and time in one field (of type
> > TimeStamp), but I have also tried separating it into two separate
> > fields (of types Date and Time) to no avail.

You'd have to do that in the database, using a trigger, if you actually
want to *store* date and time as separate values.

If you want a timestamp split into two in your query output, use
CAST(MyTimestamp as Date) and CAST(MyTimestamp as Time),
respectively. You'll get two read-only columns.

Always remember that the IB_Controls *follow* the datasets, which is
opposite to the VCL controls' requirements. If you want to display a
timestamp type in an IB_ control as date-only, set the Column Attribute NO
TIME to True; or if you want to display only the time part, set NO DATE to

> >
> > My query fetches the date and time into a field which is then used
> > as the datasource/datafield set in the TIB_DateTimePicker. I have
> > two such components on my form, one set to Kind=dtkDate (which
> > works) and the other to Kind=dtkTime (which doesn't!).

Are you trying to use the IBO* dataset components with the IB_
Controls? That won't work. (Native IBO doesn't have dtkDate and dtkTime...)


p.s. I hate DateTimePickers: I hate developing with them and I hate them
as a user. I haven't met a real-life user yet who doesn't find them