From: | Daniel Alvarado <danielal2(at)yahoo(dot)com> |
---|---|
To: | mmiranda(at)americatel(dot)com(dot)sv |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | RE: Ayuda manejo de horas |
Date: | 2005-05-23 22:28:01 |
Message-ID: | 20050523222801.40970.qmail@web20124.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Me sigue saliendo error.
CREATE TABLE prueba_hora (
duracion varchar(15));
INSERT INTO prueba_hora VALUES ('01:01:01');
SELECT * FROM prueba_hora;
duracion
----------
01:01:01
(1 row)
SELECT EXTRACT(EPOCH FROM duracion::interval)
FROM prueba_hora;
ERROR: Cannot cast type character varying to interval
Tal ves sera por algo de la configuracion de mi
postgresql.
--- mmiranda(at)americatel(dot)com(dot)sv wrote:
> Daniel Alvarado wrote:
> > Esto me regresa el siguiente error.
> > SELECT EXTRACT(EPOCH FROM duracion::interval);
> > ERROR: Cannot cast type character to interval
> >
> > Que me estara faltando?
> >
>
>
> Umm, no se, aqui funciona bien:
>
> radius=# CREATE TABLE prueba_hora (
> radius(# duracion varchar(15)
> radius(# );
> CREATE TABLE
> radius=#
> radius=# INSERT INTO prueba_hora VALUES
> ('01:01:01');
> INSERT 75293822 1
> radius=# SELECT * FROM prueba_hora;
> duracion
> ----------
> 01:01:01
> (1 row)
>
> radius=# SELECT EXTRACT(EPOCH FROM
> duracion::interval) FROM prueba_hora;
> date_part
> -----------
> 3661
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2005-05-23 22:35:43 | Re: CAMBIO DE FORMATO |
Previous Message | Ing. Jhon Carrillo | 2005-05-23 22:22:42 | CAMBIO DE FORMATO |