Date Format | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Date Format

Hello All, I need to show the date in this format ’07-Jun-07′ in my SQL report. Can any one tell me how to do it. I tried the format function I could not get it to work. Thanks,
Hi Pal, Can you tell me data type for the field and some sample data in database ? Cheers
Hi there!!!<br />Just add in <b>Convert.ToDateTime</b>(Field!XYZ.Value)<b>ToString("dd-MMM-yy")</b><br />that will convert your date format to ’07-Jun-07′ [<img src=’/community/emoticons/emotion-2.gif’ alt=’:D‘ />]
Also Format(Field!XYZ.Value,"dd-MMM-yy") will do the job —————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at