Subject Re: [firebird-support] Finding Diffrence in Time
Author Mark Rotteveel
>   I'm trying to write a query in firebird 2.1.3 database, where i want
> to determine the difference in two times which are stored as varchar.

Why are you storing them als VARCHAR in the first place? If they are always TIME, then store them as TIME.

> Right now I'm doing this by casting the varchar into time then
> extracting the hour and minute part from that time and then calculating
> the diffrence by multiplying 60 to hour part and adding it to minute
> part.
>
> Are there any alternatives for this.

Sure, you can use DATEDIFF: http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-datediff.html
--
GRATIS: Spider-Man 1-3 sowie 300 weitere Videos!
Jetzt freischalten! http://portal.gmx.net/de/go/maxdome