Computer Science, asked by ssusur1496, 10 months ago

Write a query to display schedule id and date in the format of yyyy-mm-dd and name the column as formatteddate. Display record in ascending order by schedule id.

Answers

Answered by Anonymous
5

Answer:

Explanation:

To display schedule id and date in the format of yyyy-mm-dd we need to use the function -

SELECT DATE_FORMAT(CURDATE(), '%d/%m/%Y') today;  ( or whichever date)

—syntax :: select date_format (date_ordered,%d-%m-%Y') from your_table;

>>Use Alter Table function to date format %d/%m/%Y (tip : Y->YYYY and y->YY)

>> SELECT DATE_FORMAT(column_Date ,'%d-%m-%Y') AS DateofEntry FROM userdata;

We can also use the style codes if we have standard date format

Similar questions