After getting server date u can convert tht into .net datetime object
and from tht u can get in the format u need.
 
sqlcommand cmd=new sqlcommand("select getdate()",conn)
Datetime dt=convert.todatetime(cmd.ExecuteScalar());
dt.DayOfWeek + dt.ToString("dd MMM,yyyy")

  _____  

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of ramireddy.s
Sent: Tuesday, October 16, 2007 07:04 PM
To: [email protected]
Subject: [.NetIndia] Regarding Date format in Sql server


Hai all, 
 
I have  a problem while retrieving the date like the following format.
 
"  Wed Sep 19 , 2007 "
 
I have tried like this way..
 
select CONVERT(varchar,getdate(),107)
 
But i am getting like this fashion.
 
"Oct 16, 2007"
 
I want day has to be come in the first..
 
Could you able to help me in this regard asap.
 
 
Rgrds
Rami reddy. S




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
".NetIndia" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/TechdotNetIndia?hl=en
http://www.satheeshbabu.com
http://www.satheeshbabu.blogspot.com/
-~----------~----~----~----~------~----~------~--~---

Reply via email to