Showing posts with label jan. Show all posts
Showing posts with label jan. Show all posts

Wednesday, March 7, 2012

Format result of sp_helpdb

Hello.

How to format field "create" (Jan 12 2005) in sp_helpdb
procedure to sth like yyyy-mm-dd (2005-01-12) in SQL?

bye...

--
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +----------+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+[BuKoX] (bukoxSPAMEROM_MOWIMY_NIE@.tlen.pl) writes:
> How to format field "create" (Jan 12 2005) in sp_helpdb
> procedure to sth like yyyy-mm-dd (2005-01-12) in SQL?

You would have to write your own version of sp_helpdb to that end. While
the source code is in master, I don't think it's worth the effort for
such a little change.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, February 26, 2012

format month name in chart

I'm trying to format the month name in a chart. I have dates, such as 1/31/2006, 2/28/2006 etc. I want them to display as Jan, Feb, Mar etc.

I know I can put 'P0' in the format field to format as a %.

Is there a format for the month name?

Yes, DateName(DatePart(month,"1/31/2006"))

Hammer