Day 13. Dates and Time in SQL

Today 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 today, 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

Note

As you know by now, there are many different implementations of SQL. In this book, we use the ANSI standard and the most common nonstandard functions, commands, and operators. ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.