Subject Re: [firebird-support] Firebird Time type field clarification
Author Don Gollahon
My problem is, I have a query that locates a record by the time:

query.parambyname('phonenum').asstring := '1234567890';
query.parambyname('call_date').asdate := vdate;
query.parambyname('call_time').astime := vtime;

As I step thru the code, I see that vtime has the fractions of a day but
query.parambyname('call_time').astime has lost the fraction after the
assignment. Same happens if I use asdatetime. This works in our old tables
when the call_date and call_time were together in a single timestamp field.


""Ivan Prenosil"" <Ivan.Prenosil@...> wrote in message
news:<00a801c34343$baffc520$876114d4@neptun>...
>
> InterBase and Firebird use the same time format,
> which is (integer) number of 0.0001 seconds from midnight.
>
> There are many different date/time formats used in different environments,
> like tm, time_t, TTimeStamp, TDateTime, etc., each of which
> has its own limits (e.g. tm storing only whole seconds).
>
> IB/FB provides some built-in API functions for converting between IB/FB
native
> format and tm strucutre. NOTHING/NOBODY force you to use these
> functions and tm format.
>
>
> > InterBase's API doesn't have a place to put millisecond information.
> > Therefore any tool (including IBX) which uses the IB API and its native
> > TM struct to send time information to IB will truncate milliseconds.
> > -Craig
>
> Wrong. TM is _not_ native format of IB/FB.
>
>
> Ivan Prenosil
> http://www.volny.cz/iprenosil/interbase
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>