Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 date format in to month and year

Author  Topic 

zara_chd
Starting Member

7 Posts

Posted - 2011-10-11 : 08:38:22
Hi,
I Have this query :Select Distinct CONVERT(DATETIME, EDATE,103)AS EX_FDATE
FROM
RPTDB.DBO.XOPDATA
Result Format:2009-11-11 00:00:00.000

But i want result some thing like:11 Nov 2009 only

How can i get this result. Please help me

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-10-11 : 08:43:24
You are displaying a datetime - it's the default display.
try
Select Distinct convert(varchar(11),CONVERT(DATETIME, EDATE,103),106) AS EX_FDATE


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-10-13 : 09:45:18
This is the formation issue. If you want to show them in front end application, do formation there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -