O'Reilly logo

V14 Certification: Teradata SQL by Tom Coffing, Leona 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 6 – Date Functions

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

- Chinese Proverb

Current_Date

This example uses the Current_Date to return the current date.

SELECT Current_Date as ANSI_Date;

ANSI_Date

------------

2014-10-04

“Not all who wander are lost.”

–J. R. R. Tolkien

The Current_Date will return today’s date.

Date, Time, and Current_Timestamp Keywords

SELECT Date

AS "Date"

              ,Current_Date

AS ANSI_Date

              ,Time

AS "Time"

              ,Current_Time

AS ANSI_Time

              ,Current_Timestamp(6)

AS ANSI_Timestamp

image

There’s no keyword Timestamp,but only ANSI’sCurrent_Timestamp ...

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