Subject | Re: [IBO] Please urgent "TimeStamp" |
---|---|
Author | gbehnke2000 |
Post date | 2001-12-27T09:59:01Z |
Hello Helen,
many thank's for your fast answer and all the best for the new year.
Best regards
Gerhard
P.S. it's not to cold and there is a little bit snow. But it's a
typically Hamburg Wheather. Rain, Snow and slush.
many thank's for your fast answer and all the best for the new year.
Best regards
Gerhard
P.S. it's not to cold and there is a little bit snow. But it's a
typically Hamburg Wheather. Rain, Snow and slush.
--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> At 08:40 AM 27-12-01 +0000, Gerhard Behnke wrote:
> >Dear All,
> >
> >i have the following Problem:
> >Database FireBird RC2
> >IB-Objects 4..
> >
> >Instead of the DataField "Time" or "Date" i need to use the
FieldType
> >"TimeStamp" now i have the Problem to read the FieldValue and
extract
> >the Time part respectively the Date part.
> >With:
> >ibcursor_->FieldByName(_F_CREATE_TIME)->AsDateTime).FormatString("
> >dd.mm.yy hh:nn");
> >I get only the correct time part but not the correct Date part:
> > " 30.12.99 16:12"
>
> All you need to do is set the ColumnAttribute NOTIME in order to
display date only; and NODATE in order to display time only. You
can do it in code (see the TI sheet on Working with Datasets or the
Appendix in the Getting Started Guide) but it's easiest to do it in
the Fields Editor (double-click on the dataset component). Note that
if you want to show these as two fields, you will have to bring
two "copies" of the column across from the single timestamp column -
just alias one of them and remember to set the COMPUTED attribute for
the alias column.
>
>
> >I try to cast the TimeStamp in my SQL-Statment to
> >SELECT MldIndex,Cast(Create_Time As timestamp),GUID_CHANGE FROM
> >STAR_DOCUMENT_S (157122,1,100,'DESC')
> >
> >But in this case i get the error-messages.
> > "FieldName: Create_Time not found"
>
> This a SELECT on a stored procedure, right? I'd want to check the
declarations of the output variables...if you declared the SP in a
tool that wasn't IB_SQL, it's fairly likely that the tool is forcing
case-sensitivity upon you. Try copying the the variable name's case
exactly as declared in the SP *and* placing double-quotes around it,
to see if that improves anything.
>
> Also, if the column (output variable?) Create_Time was declared as
Timestamp, you won't have to use CAST.
>
> Hoping you're not tooooo cold over there in Hamburg...
>
> cheers,
> Helen