Pretty simple really. Try this SQL:

SELECT CONVERT(nvarchar(20), GetDate(), 101);

or

SELECT CONVERT(nvarchar(20), CAST(’2008-04-04 16:07:07.920′ AS DateTime), 101);

If you need to use it in a comparison you can easily do something like

WHERE CONVERT(nvarchar(20), MyDateColumn, 101) BETWEEN @DateFrom AND @DateTo

Enjoy!

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 Killfly Blogs Suffusion theme by Sayontan Sinha