Format Date in SQL Stored Procedure
Posted on 2008-06-20
Hello, I have a simple question.
How do I format a date in a stored procedure that selects some records from a table? I need the format to be like this:
Usually, I get the date value like this: 06/19/2008 12:00:00 AM. I am exporting these records through a dataset in a .NET application to a text file and I need the date format to be exacly what I need. I don't need the 12 or the AM/PM label. Also, the formatted date has to be a datetime field and not a text or varchar.