O'Reilly logo

Teradata SQL by Tom Coffing, Mike Larkins

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

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

- Cindy Crawford

 

The FORMAT Command

SELECT Current_Date (FORMAT ‘mm-dd-yy’) ;

 

images

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

images

When you put ‘mm’, you will get the month as a two digit number.

 

images

When you put ...

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