[dba-SQLServer]Convert int month to char month

Stuart McLachlan stuart at lexacorp.com.pg
Fri Apr 25 19:37:47 CDT 2003


Simplest would be:

SUBSTRING("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC",myMonth * 3 -2,3)

On 25 Apr 2003 at 8:26, Stoker, Kenneth E wrote:

> Does anyone know of a way to convert the return value of
> month([mydate]) from an integer to its equivalent char value?
> 
>  1	JAN
>  2	FEB
>  3	MAR
>  .....
> 
> Thank you for your help.
> 

-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.





More information about the dba-SQLServer mailing list