The SQL FORMAT() function is used to format how a field should be displayed. You can format dates in a column in the following manner:
SELECT FullNames, Surname, UserID, FORMAT(Now(),'YYYY-MM-DD') AS LoggedInDateFROM Users;
Home » Using the SQL FORMAT Function
The SQL FORMAT() function is used to format how a field should be displayed. You can format dates in a column in the following manner:
SELECT FullNames, Surname, UserID, FORMAT(Now(),'YYYY-MM-DD') AS LoggedInDateFROM Users;
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.