Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP

From: Rodrigo Gonzalez <rjgonzale(at)estrads(dot)com(dot)ar>
To: Marcos Alberto Flores Valda <marcos(dot)flores(at)ende(dot)bo>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP
Date: 2011-11-17 19:29:24
Message-ID: 4EC56094.1020503@estrads.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

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

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Marcos Alberto Flores Valda 2011-11-17 19:36:11 Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP
Previous Message Jaime Casanova 2011-11-17 19:29:21 Re: EXTRAER HORA, MINUTOS Y SEGUNDOS DE TIMESTAMP