pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTime Help
6+ messages / 2 participants
[nested] [flat]
* Time Help
@ 2000-08-22 10:47 Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 13:55 ` Re: Time Help Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 14:21 ` Re: Time Help Brian C. Doyle <bcdoyle@mindspring.com>
0 siblings, 2 replies; 6+ messages in thread
From: Brian C. Doyle @ 2000-08-22 10:47 UTC (permalink / raw)
To: pgsql-sql
Hello all,
I have a query result of @ 2 hours 10 mins 6 secs and I would like to
change that to 02:10:06. Currently the field is listed as "timespan" This
allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10 min 6 sec
which are all the formats that I will be entering the time formats! How do
I convert it into a the format of 02:10:06
Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Time Help
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-08-22 13:55 ` Mark Volpe <volpe.mark@epamail.epa.gov>
1 sibling, 0 replies; 6+ messages in thread
From: Mark Volpe @ 2000-08-22 13:55 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
I'm not sure at all what you are asking, but I'm thinking you're trying to
convert a "timespan" to a "time". Try adding it to a time like this:
SELECT '0:00:00'::time + '02:10:06'::timespan;
Mark
"Brian C. Doyle" wrote:
>
> Hello all,
>
> I have a query result of @ 2 hours 10 mins 6 secs and I would like to
> change that to 02:10:06. Currently the field is listed as "timespan" This
> allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10 min 6 sec
> which are all the formats that I will be entering the time formats! How do
> I convert it into a the format of 02:10:06
>
> Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Time Help
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-08-22 14:21 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 14:36 ` Re: Time Help Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 15:03 ` Re: Time Help Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 16:26 ` Re: Time Help Brian C. Doyle <bcdoyle@mindspring.com>
1 sibling, 3 replies; 6+ messages in thread
From: Brian C. Doyle @ 2000-08-22 14:21 UTC (permalink / raw)
To: Mark Volpe <volpe.mark@epamail.epa.gov>; +Cc: pgsql-sql
Mark,
I tried that and had to change it to:
SELECT '0:00:00'::timespan + '02:10:06'::timespan;
To get any response. the response i got was
@ 2 hours 10 mins 6 secs
Still in the wrong format
If is use :
SELECT '0:00:00'::time + '02:10:06'::timespan;
It get
No such function 'time_timespan' with the specified attributes
So i guess what I want to do is convert a timespan into time
How would I do that?
At 09:55 AM 8/22/00 -0400, Mark Volpe wrote:
>I'm not sure at all what you are asking, but I'm thinking you're trying to
>convert a "timespan" to a "time". Try adding it to a time like this:
>SELECT '0:00:00'::time + '02:10:06'::timespan;
>
>Mark
>
>"Brian C. Doyle" wrote:
> >
> > Hello all,
> >
> > I have a query result of @ 2 hours 10 mins 6 secs and I would like to
> > change that to 02:10:06. Currently the field is listed as "timespan" This
> > allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10 min 6 sec
> > which are all the formats that I will be entering the time formats! How do
> > I convert it into a the format of 02:10:06
> >
> > Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Time Help
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 14:21 ` Re: Time Help Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-08-22 14:36 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2 siblings, 0 replies; 6+ messages in thread
From: Mark Volpe @ 2000-08-22 14:36 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
I tried it on a box with postgres 6.5.3 and I got the result you did. On
postgres 7.0 I get 02:10:06 for both results. You should upgrade to 7.0 - it
is _much_ better.
Mark
"Brian C. Doyle" wrote:
>
> Mark,
>
> I tried that and had to change it to:
>
> SELECT '0:00:00'::timespan + '02:10:06'::timespan;
>
> To get any response. the response i got was
>
> @ 2 hours 10 mins 6 secs
>
> Still in the wrong format
> If is use :
>
> SELECT '0:00:00'::time + '02:10:06'::timespan;
>
> It get
>
> No such function 'time_timespan' with the specified attributes
>
> So i guess what I want to do is convert a timespan into time
> How would I do that?
>
> At 09:55 AM 8/22/00 -0400, Mark Volpe wrote:
> >I'm not sure at all what you are asking, but I'm thinking you're trying to
> >convert a "timespan" to a "time". Try adding it to a time like this:
> >SELECT '0:00:00'::time + '02:10:06'::timespan;
> >
> >Mark
> >
> >"Brian C. Doyle" wrote:
> > >
> > > Hello all,
> > >
> > > I have a query result of @ 2 hours 10 mins 6 secs and I would like to
> > > change that to 02:10:06. Currently the field is listed as "timespan" This
> > > allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10 min 6 sec
> > > which are all the formats that I will be entering the time formats! How do
> > > I convert it into a the format of 02:10:06
> > >
> > > Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Time Help
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 14:21 ` Re: Time Help Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-08-22 15:03 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2 siblings, 0 replies; 6+ messages in thread
From: Mark Volpe @ 2000-08-22 15:03 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; pgsql-sql
SELECT '0:00:00'::time + '@ 2 hours 10 mins 6 secs'::timespan;
?column?
----------
02:10:06
Mark
"Brian C. Doyle" wrote:
>
> Mark,
>
> On your 7.0 box would you do:
>
> SELECT '0:00:00'::time + '@ 2 hours 10 mins 6 secs':timespan;
>
> For me and see if it will convert it! Need to decide if the upgrade will be
> with it and if it does this then it is!!!!
>
> Thanks for your help Mark
>
> At 10:36 AM 8/22/00 -0400, you wrote:
> >I tried it on a box with postgres 6.5.3 and I got the result you did. On
> >postgres 7.0 I get 02:10:06 for both results. You should upgrade to 7.0 - it
> >is _much_ better.
> >
> >Mark
> >
> >"Brian C. Doyle" wrote:
> > >
> > > Mark,
> > >
> > > I tried that and had to change it to:
> > >
> > > SELECT '0:00:00'::timespan + '02:10:06'::timespan;
> > >
> > > To get any response. the response i got was
> > >
> > > @ 2 hours 10 mins 6 secs
> > >
> > > Still in the wrong format
> > > If is use :
> > >
> > > SELECT '0:00:00'::time + '02:10:06'::timespan;
> > >
> > > It get
> > >
> > > No such function 'time_timespan' with the specified attributes
> > >
> > > So i guess what I want to do is convert a timespan into time
> > > How would I do that?
> > >
> > > At 09:55 AM 8/22/00 -0400, Mark Volpe wrote:
> > > >I'm not sure at all what you are asking, but I'm thinking you're trying to
> > > >convert a "timespan" to a "time". Try adding it to a time like this:
> > > >SELECT '0:00:00'::time + '02:10:06'::timespan;
> > > >
> > > >Mark
> > > >
> > > >"Brian C. Doyle" wrote:
> > > > >
> > > > > Hello all,
> > > > >
> > > > > I have a query result of @ 2 hours 10 mins 6 secs and I would like to
> > > > > change that to 02:10:06. Currently the field is listed as
> > "timespan" This
> > > > > allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10
> > min 6 sec
> > > > > which are all the formats that I will be entering the time formats!
> > How do
> > > > > I convert it into a the format of 02:10:06
> > > > >
> > > > > Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Time Help
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 14:21 ` Re: Time Help Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-08-22 16:26 ` Brian C. Doyle <bcdoyle@mindspring.com>
2 siblings, 0 replies; 6+ messages in thread
From: Brian C. Doyle @ 2000-08-22 16:26 UTC (permalink / raw)
To: Mark Volpe <volpe.mark@epamail.epa.gov>; pgsql-sql
In Conclusion:
7.0.2 by default outputs the time span as 00:00:00 no matter what format
you put in.
There is no need to convert it!
Thanks to Mark for all your help!!
At 11:03 AM 8/22/00 -0400, Mark Volpe wrote:
>SELECT '0:00:00'::time + '@ 2 hours 10 mins 6 secs'::timespan;
>
> ?column?
>----------
> 02:10:06
>
>Mark
>
>
>"Brian C. Doyle" wrote:
> >
> > Mark,
> >
> > On your 7.0 box would you do:
> >
> > SELECT '0:00:00'::time + '@ 2 hours 10 mins 6 secs':timespan;
> >
> > For me and see if it will convert it! Need to decide if the upgrade will be
> > with it and if it does this then it is!!!!
> >
> > Thanks for your help Mark
> >
> > At 10:36 AM 8/22/00 -0400, you wrote:
> > >I tried it on a box with postgres 6.5.3 and I got the result you did. On
> > >postgres 7.0 I get 02:10:06 for both results. You should upgrade to
> 7.0 - it
> > >is _much_ better.
> > >
> > >Mark
> > >
> > >"Brian C. Doyle" wrote:
> > > >
> > > > Mark,
> > > >
> > > > I tried that and had to change it to:
> > > >
> > > > SELECT '0:00:00'::timespan + '02:10:06'::timespan;
> > > >
> > > > To get any response. the response i got was
> > > >
> > > > @ 2 hours 10 mins 6 secs
> > > >
> > > > Still in the wrong format
> > > > If is use :
> > > >
> > > > SELECT '0:00:00'::time + '02:10:06'::timespan;
> > > >
> > > > It get
> > > >
> > > > No such function 'time_timespan' with the specified attributes
> > > >
> > > > So i guess what I want to do is convert a timespan into time
> > > > How would I do that?
> > > >
> > > > At 09:55 AM 8/22/00 -0400, Mark Volpe wrote:
> > > > >I'm not sure at all what you are asking, but I'm thinking you're
> trying to
> > > > >convert a "timespan" to a "time". Try adding it to a time like this:
> > > > >SELECT '0:00:00'::time + '02:10:06'::timespan;
> > > > >
> > > > >Mark
> > > > >
> > > > >"Brian C. Doyle" wrote:
> > > > > >
> > > > > > Hello all,
> > > > > >
> > > > > > I have a query result of @ 2 hours 10 mins 6 secs and I would
> like to
> > > > > > change that to 02:10:06. Currently the field is listed as
> > > "timespan" This
> > > > > > allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10
> > > min 6 sec
> > > > > > which are all the formats that I will be entering the time formats!
> > > How do
> > > > > > I convert it into a the format of 02:10:06
> > > > > >
> > > > > > Thanks to you all
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2000-08-22 16:26 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-22 10:47 Time Help Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 13:55 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 14:21 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-08-22 14:36 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 15:03 ` Mark Volpe <volpe.mark@epamail.epa.gov>
2000-08-22 16:26 ` Brian C. Doyle <bcdoyle@mindspring.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox