ISSUE :
 
Profile photo
Submitted by Tylar Brown
on June 20th, 2011 at 19:31:55 EST

sql getdate() - mm-dd-yyyy

hi everyone!
i used getdate() to get current but i get(yyyy-mm-dd hh.mm.ss)
is there a way i can just get mm-dd-yyyy
please help me!


Profile photo
Replied by Thompson26
on June 20th, 2011 at 19:33:57 EST
try this

Convert(varchar,getdate(),110)
Edited on June 20th, 2011 at 19:34:08 EST

Profile photo
Replied by Thompson26
on June 20th, 2011 at 19:38:57 EST
Also you can get just time for
 Convert(varchar,getdate(),114) 


http://msdn.microsoft.com/en-us/library/ms187928.aspx
Accepted Answer
Accepted
 Answer

Profile photo
Replied by Tylar Brown
on August 12th, 2011 at 20:17:55 EST
thanks