Skip site navigation (1) Skip section navigation (2)

How to extract hour and minutes from a timestamp

From: Tan ga <gndtanga(at)mail(dot)pt>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to extract hour and minutes from a timestamp
Date: 2002-10-17 16:52:05
Message-ID: 20021017175001.5E5AB47590C@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-novice
Hi again :) 

I already resolver my other problem but now i would like to extract both
time and hour from a timestamp in order to compare with a string.
Ex 2000-01-01 19:30:00 
I want the result to be 19:30

With select substr(....) i can do this but that's not what i want.

I'm using python with postgres.
-- 
10Mb na sua caixa de email gratuita no mail.pt
http://www.mail.pt

Responses

pgsql-novice by date

Next:From: Andrew McMillanDate: 2002-10-17 19:34:19
Subject: Re: How to extract hour and minutes from a timestamp
Previous:From: Josh BerkusDate: 2002-10-17 16:16:50
Subject: Re: char() or varchar() for frequently used column

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group