SQL Server Performance

Date Format

Discussion in 'SQL Server 2005 Reporting Services' started by sqlpal2007, Jun 7, 2007.

  1. sqlpal2007 New Member

    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
  2. techbabu303 New Member

    Hi Pal,

    Can you tell me data type for the field and some sample data in database ?

    Cheers
    Sat
  3. sonx6 New Member

    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' />]
  4. dineshasanka Moderator

    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/

Share This Page