87,152 views
7 votes
7 votes
Write a SELECT statement that returns these columns from the Orders table:

The order_date column

A column that uses the DATE_FORMAT function to return the four-digit year that’s stored in the order_date column

A column that uses the DATE_FORMAT function to return the order_date column in this format: Mon-DD-YYYY. In other words, use abbreviated months and separate each date component with dashes.

A column that uses the DATE_FORMAT function to return the order_date column with only the hours and minutes on a 12-hour clock with an am/pm indicator

User Tuffkid
by
3.4k points

1 Answer

13 votes
13 votes

Answer:

see below

Step-by-step explanation:

SELECT date_format(order_date,"%Y"), date_format(order_date,"%a-%d-%Y"), date_format(order_date,"%r")

User Teggy
by
3.6k points