Link to home
Start Free TrialLog in
Avatar of ulf-jzl
ulf-jzlFlag for Sweden

asked on

MSSQL 2008: Get month (Jan,Feb..) from datetime

HI!

How do I format/convert the datetime  to only return a string with  the month? Jan,Feb, ...
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Checkout : select DATENAME(m,GETDATE())
Avatar of ulf-jzl

ASKER

so to get the 3 char?

CONVERT(Varchar(3), datename(month, month(getdate())))
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ulf-jzl

ASKER

ops..
select CONVERT(Varchar(3), datename(month, getdate()))
You already have the answer from Eval and Me for your last question...

Please take a look
Avatar of ulf-jzl

ASKER

Thx guys!! :)