[dba-SQLServer]Convert int month to char month

Mike and Doris Manning mikedorism at ntelos.net
Fri Apr 25 10:46:04 CDT 2003


That will work if he is using Access as an FE but if he is doing this inside
SQL Server itself it won't.  SQL doesn't have a Format function like Access
does.

Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com


-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net
Sent: Friday, April 25, 2003 11:36 AM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer]Convert int month to char month


try something like

format(MyIntNumber,"MMM")

that may do it.....

Paul


From: "Stoker, Kenneth E" <Kenneth.Stoker at pnl.gov>
Date: Fri 25/Apr/2003 15:26 GMT
To: "dba-SQLServer (E-mail)" <dba-SQLServer at databaseadvisors.com>
Subject: [dba-SQLServer]Convert int month to char month

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.

Ken Stoker
Technology Commercialization
Information Systems Administrator
PH: (509) 375-3758
FAX: (509) 375-6731
E-mail:  Kenneth.Stoker at pnl.gov 


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


__________________________________________________________________________
Join Freeserve http://www.freeserve.com/time/

Winner of the 2003 Internet Service Providers' Association awards for Best
Unmetered ISP and Best Consumer Application.


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com



More information about the dba-SQLServer mailing list