SQL is the first programming language with temporal data types. The SQL-92 standard added temporal data to the language, acknowledging most of what was already in most SQL products by that time. The problem is that each vendor made a trade-off internally.
Read the 27-page whitepaper “Making Time Using Temporal Data” by Joe Celko to learn about temporal data and how to improve your SQL code. The whitepaper describes how to make time using temporal data, the ISO temporal model, SQL temporal data types, tips for handling dates and times, date and time format standards, time in a database, time zones, interval data types, queries with date arithmetic, and much more.
The author, Joe Celko, serves as Member of Technical Advisory Board of Cogito, Inc. Mr. Celko joined the ANSI X3H2 Database Standards Committee in 1987 and helped write the ANSI/ISO SQL-89 and SQL-92 standards. He is one of the top SQL experts in the world, writing over 700 articles primarily on SQL and database topics in the computer trade and academic press. The author of six books on databases and SQL, Mr. Celko also contributes his time as a speaker and instructor at universities, trade conferences, and local user groups.