ReadVitamin

Blogging on Teradata SQL and More

2 Comments

mygif
Nirupama Said in Thursday, December 6th, 2007 @6:02 am  

I want to retrieve only the hour part and minute part from the date. Please can u help me in this regard?

mygif
admin Said in Thursday, December 6th, 2007 @5:49 pm  

Hi Nirupama,
You can use EXTRACT function to retrive HOUR and MINUTE variables as follows
SELECT EXTRACT (HOUR from time);
SELECT EXTRACT ( MINUTE FROM time);

If you would like to have both, then concatenate them as follows:

SELECT EXTRACT (HOUR from time) || EXTRACT ( MINUTE FROM time)

Hope that helps.

Leave Your Comments Here

Popular Articles