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,-Pal
Hi Pal, Can you tell me data type for the field and some sample data in database ? Cheers
Sat
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=’
![Big Grin :D :D](styles/default/xenforo/smilies/biggrin.png)
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
http://dineshasanka.spaces.live.com/
]]>