Re: Ayuda manejo de horas

From: Daniel Alvarado <danielal2(at)yahoo(dot)com>
To: "Ing(dot) Jhon Carrillo" <jdigital(at)cantv(dot)net>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Ayuda manejo de horas
Date: 2005-05-23 21:22:08
Message-ID: 20050523212208.31190.qmail@web20124.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Con esto queda solucionado el enigma.

Muchas gracias mi estimado Jhon.
Obtuve el resultado que esperaba.

saludos!!

--- "Ing. Jhon Carrillo" <jdigital(at)cantv(dot)net> wrote:
> Hi dear friend:
>
> prueba con esto:
>
> select
>
(to_number(to_char(to_timestamp('01:01:01','HH:MI:SS'),'HH'),'99')
> *
> 3600) +
>
>
(to_number(to_char(to_timestamp('01:01:01','HH:MI:SS'),'MI'),'99')
> * 60) +
> (
>
to_number(to_char(to_timestamp('01:01:01','HH:MI:SS'),'SS'),'99'))
> as
> algo_en_segundos
>
> Jhon Carrillo
> Ingeniero en Computacin
> jdigital+(at)+cantv+(dot)+net (quitar +)
> +584145246033
> Caracas - Venezuela
>
> > Que tal.
> > Esto solo me regresa la parte 'SS'.
> > select
> to_char(to_timestamp(duracion,'HH:MI:SS'),'SS')
> > from tabla1;
> >
> > Lo que en realidad necesito es el numero total de
> > segundos. Por ejemplo en '01:01:01' son 3661
> segundos.
> > Eso es lo que necesito obtener.
> >
> > Saludos Jhon, y gracias.
> >
> >
> > --- "Ing. Jhon Carrillo" <jdigital(at)cantv(dot)net>
> wrote:
> > > Saludos,
> > >
> > > Prueba con esto:
> > >
> > > select
> > > to_char(to_timestamp(duracion,'HH:MI:SS'),'SS');
> > >
> > > espero te sirva
> > >
> > > Suerte!!!
> > >
> > > Jhon Carrillo
> > > Ingeniero en Computacin
> > > jdigital+(at)+cantv+(dot)+net (quitar +)
> > > +584145246033
> > > Caracas - Venezuela
> > >
> > >
> > >
> > >
> > > Select to_char(duracion,'HH:MI:SS')
> > > ----- Original Message -----
> > > From: "Daniel Alvarado" <danielal2(at)yahoo(dot)com>
> > > To: <pgsql-es-ayuda(at)postgresql(dot)org>
> > > Sent: Monday, May 23, 2005 1:00 PM
> > > Subject: [pgsql-es-ayuda] Ayuda manejo de horas
> > >
> > >
> > > > Que tal Lista.
> > > > Tengo una tabla con un campo (duracion
> varchar(8))
> > > en
> > > > el cual tengo valores de horas en formato
> > > HH:MI:SS,
> > > > por ejemplo '01:01:01'.
> > > > Necesito obtener el numero de segundos, en
> este
> > > caso
> > > > 3661 segundos.
> > > > Esto es lo que estoy haciendo pero no
> funciona.
> > > > select extract(EPOCH from time duracion)
> > > > from tabla1
> > > > Este es el error que obtengo:
> > > > parse error at or near "duracion" at character
> 32.
> > > > Que debo hacer???
> > > >
> > > >
> > > >
> > > > Discover Yahoo!
> > > > Use Yahoo! to plan a weekend, have fun online
> and
> > > more. Check it out!
> > > > http://discover.yahoo.com/
> > > >
> > > > ---------------------------(fin del
> > > mensaje)---------------------------
> > > > TIP 10: visita nuestro canal de IRC
> #postgresql-es
> > > en irc.freenode.net
> > > >
> > >
> > >
> > >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail Mobile
> > Take Yahoo! Mail with you! Check email on your
> mobile phone.
> > http://mobile.yahoo.com/learn/mail
> >
>
>
>


__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Daniel Alvarado 2005-05-23 21:32:27 RE: Ayuda manejo de horas
Previous Message mmiranda 2005-05-23 21:10:39 RE: Ayuda manejo de horas