O'Reilly logo

Sams Teach Yourself SQL in One Hour a Day, Fifth Edition by Arie D. Jones, Ron Plew, Ryan Stephens

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

LESSON 12Dates and Time in SQL

In this lesson, you will learn about the nature of dates and time in SQL and how they are stored and used in a relational database. Not only will we discuss the DATETIME data type in more detail; we will show how some implementations utilize dates, explain some of the common rules, and show how to extract the date and time in a desired format. By the end of this lesson, you should understand the following about dates and time in SQL:

• How the date and time are stored

• Typical date and time formats

• How to use date functions

• How to perform date conversions

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