Subject | RE: [firebird-support] Extracting Time |
---|---|
Author | Alan McDonald |
Post date | 2003-06-26T03:21:56Z |
Thanks - yes I am just doing an F_MID on the cast as TIME
and I can appreciate all this conformity - nonetheless, I've been doing this
with the old datstamp fields for years and it never needed any conversion
previously. it just gave me the date and time.
it's nice and fast though
thanks
Alan
and I can appreciate all this conformity - nonetheless, I've been doing this
with the old datstamp fields for years and it never needed any conversion
previously. it just gave me the date and time.
it's nice and fast though
thanks
Alan
> -----Original Message-----
> From: Helen Borrie [mailto:helebor@...]
> Sent: Thursday, 26 June 2003 1:18 PM
> To: firebird-support@yahoogroups.com
> Subject: RE: [firebird-support] Extracting Time
>
>
> At 12:55 PM 26/06/2003 +1000, you wrote:
>
> >The cast statement returns milleseconds... pity - I'll have to do some
> >client side work on it.
>
> Another thing you can use is the EXTRACT() function:
>
> SELECT CAST (
> EXTRACT (HOUR FROM aTimestamp)
> + EXTRACT (MINUTE FROM aTimestamp)
> + EXTRACT (SECOND FROM aTimestamp)
> AS TIME) as TimeOfDay
> ....
>
> You will still get fractions of a second (not milliseconds: that's
> Delphi; the Firebird fraction is ten-thousandths of a second) but they
> will be .0000.
>
> >It's a shame that the new dialect lost the simplicity of date
> and time being
> >exactly that when it added the new data types.
>
> Hmm, that's not a true assumption. The old DATE type was like the new
> TIMESTAMP and there was no TIME type at all.
>
> ***Shame????*** Whoa! The new types not only make it much easier
> to get the
> date (day) and time separately but they also make the date/time handling
> conformant with the SQL standard.
>
> heLen
>
>
>
> >Alan
> >
> >
> >
> >
> >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/
>
>
>
>
> 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/
>
>