O'Reilly logo

HP Vertica - Architecture and SQL by Leslie Nolander, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9 – Date Functions

"An inch of time cannot be bought with an inch of gold."

- Chinese Proverb

Current_Date

image

The Current_Date will return today's date.

Current_Date, Current_Time and Current_Timestamp

image

Above are the keywords you can utilize to get the date, time or timestamp. These are reserved words that the system will deliver to you when requested.

Timestamp Differences

SELECT Current_Timestamp(0)    AS Col1

,Current_Timestamp(6)    AS Col2

A timestamp has the date separated by a space and the time. In our second example we have asked ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required