From: | Bjørn T Johansen <btj(at)havleik(dot)no> |
---|---|
To: | Steve Worsley <sworsley(at)commandprompt(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Hour difference? |
Date: | 2003-08-18 21:21:03 |
Message-ID: | 1061241662.2704.171.camel@pennywise.havleik.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Well, that might help, thanks... :)
BTJ
On Mon, 2003-08-18 at 20:47, Steve Worsley wrote:
> fingerless=# select '7:43'::time AS start, '12:17'::time AS end,
> (('12:17'::time) - ('7:43'::time))::interval AS difference;
> start | end | difference
> ----------+----------+------------
> 07:43:00 | 12:17:00 | 04:34
> (1 row)
>
>
> Hope that helps.. Just subsitute your column names for the times.
>
> --Steve
>
>
> Bjørn T Johansen wrote:
>
> >I need to compute the difference of Time fields, in the format HHMM. Is
> >it possible to do the math in the Select?
> >
> >
> >Regards,
> >
> >BTJ
> >
> >
> >
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-08-18 22:21:07 | Re: Why lower's not accept an AS declaration ? |
Previous Message | Tom Lane | 2003-08-18 21:18:25 | Re: Cache lookup failed? |