Re: How to extract hour and minutes from a timestamp - Mailing list pgsql-novice

From Josh Berkus
Subject Re: How to extract hour and minutes from a timestamp
Date
Msg-id web-1790252@davinci.ethosmedia.com
Whole thread Raw
In response to How to extract hour and minutes from a timestamp  (Tan ga <gndtanga@mail.pt>)
List pgsql-novice
Tan ga,

> 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

Check out "Functions and Operators" in the online user manual.

What you want is:

SELECT to_char(some_timestamp, 'HH:MI');

-Josh Berkus

pgsql-novice by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: How to extract hour and minutes from a timestamp
Next
From: Randy Neumann
Date:
Subject: Re: char() or varchar() for frequently used column