Converting datetime

August 25th, 2008 by Mr.M | No Comments »

Crap, I’m writing a lot today!! Someone stop me!

Okay, you run: select getdate() and got the following result: 2008-08-25 18:14:37.200

You want the result to look something like this: 08/25/2008

In order to get the result you want, you need to use the CONVERT function: select convert(varchar(11),getdate(),101)

Leave a Reply

You must be logged in to post a comment.