Format a date column
SQL
Medium
5 views
Problem Description
Show Orders with a formatted date string like YYYY-MM-DD.
Sample Test Case
Input:
Orders(order_date)
Constraints
Function name varies by DB
Official Solution
SELECT order_id, TO_CHAR(order_date, 'YYYY-MM-DD') AS order_date_str FROM Orders;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!