14.7k views
5 votes
Write a SQL command to print the date for 15 days after today's date.


\\ \\
Thanks ​

1 Answer

3 votes

hi anywhere door!

In the above query, we use system function now() to get current datetime. Then we use INTERVAL clause to filter those records where order_date falls after an interval of 15 days before present datetime. The DATEADD() function adds a time/date interval to a date and then returns the date.

Functions - Data School

DATE and TIME values in PostgreSQL have a whole special set of functions and operators for their proper use.


\:

User Abdi
by
8.8k points