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.
| Author |
Topic |
|
sparrow37
Posting Yak Master
148 Posts |
Posted - 2011-01-09 : 13:55:08
|
| Hi all:I am running this queryselect convert(varchar(10),RunDate, 101) From AutomatedTestRun and it returns:01/09/2011but I want1/9/2011How can I get this ?Regards,Asif Hameed |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-01-09 : 14:00:28
|
Select convert(varchar(10), convert(varchar(2),month(Rundate))+'/'+ convert(varchar(2),day(Rundate))+'/'+ convert(varchar(4),year(Rundate)))FROM AutomatedTestRun Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-10 : 11:01:34
|
| this is a presentation issue and would be best dealt with at front end using formatting functions. Can you tell where eaxctly you're trying to display this?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|