Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP

From: Marcos Alberto Flores Valda <marcos(dot)flores(at)ende(dot)bo>
To: Rodrigo Gonzalez <rjgonzale(at)estrads(dot)com(dot)ar>
Cc: pgsql-es-ayuda(at)postgresql(dot)org, jcasanov(at)systemguards(dot)com(dot)ec
Subject: Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP
Date: 2011-11-17 19:36:11
Message-ID: 86ae43ac-54ca-4d3e-be16-88021085c53a@metro.ende.bo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Gracias, justo lo que necesitaba, leí algo de extract y date_part por eso la idea de extraer, gracias funcionó 100%.

----- Mensaje original -----

De: "Rodrigo Gonzalez" <rjgonzale(at)estrads(dot)com(dot)ar>
Para: "Marcos Alberto Flores Valda" <marcos(dot)flores(at)ende(dot)bo>
CC: pgsql-es-ayuda(at)postgresql(dot)org
Enviados: Jueves, 17 de Noviembre 2011 15:29:24
Asunto: Re: [pgsql-es-ayuda] EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP

El 17/11/11 16:13, Marcos Alberto Flores Valda escribió:
> Hola amigos de la lista,
>
> Quisiera preguntarles como puedo extraer de un campo tipo timestamp
> (01/04/2011 11:01:35 a.m.) la hora, minutos y segundos para luego
> concatenarla en un varchar con el siguiente formato --> 11:01:35
>
> Espero me puedan ayudar, gracias, saludos.

No precisas extraer nada de nada....directamente con to_char y el
formato tenes lo que buscas

to_char(current_timestamp, 'HH12:MI:SS')

Saludos

Rodrigo

--

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message ๏̯͡๏ Guido Barosio 2011-11-17 19:53:18 Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] [OT] Integración PostgreSQL Latinas
Previous Message Rodrigo Gonzalez 2011-11-17 19:29:24 Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP