I have the following query that retrieves what I need from the database:
SELECT
dbo.SafetySuggestionsLog.ID, dbo.SafetySuggestionsLog.Title,
dbo.SafetySuggestionsLog.Description, dbo.employee.Name,
dbo.SafetySuggestionsLog.Username, dbo.Divisions.DivisionShortcut,
dbo.SafetySuggestionsType.Type,
ISNULL(dbo.SafetySuggestionsStatus.Status, '-') AS Status,
dbo.SafetySuggestionsLog.DateSubmitted
FROM
dbo.employee
INNER JOIN
dbo.SafetySuggestionsLog ON dbo.employee.Username = dbo.SafetySuggestionsLog.Username
INNER JOIN
dbo.Divisions ON dbo.employee.DivisionCode = dbo.Divisions.SapCode
INNER JOIN
dbo.SafetySuggestionsType ON dbo.SafetySuggestionsLog.TypeID = dbo.SafetySuggestionsType.ID
LEFT OUTER JOIN
dbo.SafetySuggestionsStatus ON dbo.SafetySuggestionsLog.StatusID = dbo.SafetySuggestionsStatus.ID
ORDER BY
dbo.SafetySuggestionsLog.DateSubmitted DESC
Instead of showing the date under DateSubmitted
column as (6/23/2012 7:15:00 AM
), I want to display it as (Jun-2012)
.
How to do that?