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 7 – Format Functions

“Even I don’t’ wake up looking like Cindy Crawford.”

– Cindy Crawford

The FORMAT Command

SELECT Current_Date (FORMAT 'mm-dd-yy') ;

image

In this example, we are using it for dates. All dates in Teradata are stored in the systems as an INTERGERDATE. This allows it to be read and formatted easily.

The Basics of the FORMAT Command

image

Format the dates for appearance on the report. The actual data doesn’t change.

Quiz – How will the Date Appear after Formatting

Current Date = March 20th, 2013

SELECT Current_Date (FORMAT 'mm-dd-yy') ; ...

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