Applying Date Functions to the Query

Date functions are available in SQL, varying on each specific implementation. The syntax may vary, but the overall concept and functionality are the same. Date functions, similar to character string functions, are used to manipulate the representation of date and time data. Date functions are often used to format the output of dates and time in a more presentable format, to compare date values with one another, to compute intervals between dates, and so on.

The Current Date

You may have already raised the question: How do I get the current date from the database? The need to retrieve the current date from the database may originate from several situations, but the current date is normally returned either to ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.