Skip to main content

Extracting Date & Hour in Vertica Table

  • July 24, 2015
  • 1 reply
  • 9 views

RK001

Hi All,

 

I want to extract date & hour from the below table structure i.e. 23-07-2015 and 06:00 hrs. I was trying with Date_Part but was not able to get the required result.

 

Table Structure

 

           created_at           | count
--------------------------------+-------
 Thu Jul 23 00:00:14 +0000 2015 |     1
 Thu Jul 23 00:00:20 +0000 2015 |     1
 Thu Jul 23 00:00:39 +0000 2015 |     1
 Thu Jul 23 00:01:07 +0000 2015 |     1
 Thu Jul 23 00:03:00 +0000 2015 |     1
 Thu Jul 23 00:04:28 +0000 2015 |     1
 Thu Jul 23 00:04:35 +0000 2015 |     1
 Thu Jul 23 00:04:41 +0000 2015 |     1

 

Please guide!

 

Best Regards

RK

 

1 reply

NorbertK
Forum|alt.badge.img
  • Participating Frequently
  • August 3, 2015

What is the data type for your created_at column?