the function will only return to you the processed value of a single input. How you sort it will be in your select statement.
You can do this
Create you function to look like this
Code:
select
case DatePart(Month, @DATE)
when 1 then 'January'
when 2 then 'February'
...
when 6 then 'June'
...
end + ' ' + convert(char(4),datepart(year, @DATE))
then when you call your select statement you will need to include the original date and a call to this function. then you will do the order by
so it would look e like this
Code:
select date, function_return
from table
order by date
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.