Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a SELECT statement that returns these columns from the Date_Sample table i

ID: 3814922 • Letter: W

Question

Write a SELECT statement that returns these columns from the Date_Sample table in the EX database:

The start_date column

A column that uses the DATE_FORMAT function to return the start_date column with its month name abbreviated and its month, day, and two-digit year separated by slashes

A column that uses the DATE_FORMAT function to return the start_date column with its month and day returned as integers with no leadings zeros, a two-digit year, and all date parts separated by slashes

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

A column that uses the DATE_FORMAT function to return the start_date column with its month returned as an integer with no leading zeros, its month, day, and two-digit year separated by slashes, and its hours and minutes on a 12-hour clock with an am/pm indicator

Can you please solve this question for me

Explanation / Answer

Answer:

(a) select FORMAT(start_date,’YY/MMM/DD’)from Date_Sample;

(b) select FORMAT(start_date,’YY/MM/DD’)from Date_Sample;

(c) SELECT CONVERT(VARCHAR, start_date, 100) AS DateTime_In_12h_Format from Date_Sample;

(d) select FORMAT(start_date,’YY/MM/DD’), CONVERT(VARCHAR, start_date, 100) AS DateTime_In_12h_Format from Date_Sample;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote