Subject | Re: [IBO] Please urgent "TimeStamp" |
---|---|
Author | Helen Borrie |
Post date | 2001-12-27T09:36:36Z |
At 08:40 AM 27-12-01 +0000, Gerhard Behnke wrote:
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
>Dear All,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 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"
>I try to cast the TimeStamp in my SQL-Statment toThis 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.
>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"
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