Format Datetime column in the Required format

  • can any one answer this , i  have a database column that has the date and time fields (e.g 01/08/2005 10:30:22 pm). I want to format this particular column so that it just displays the date with the hours and minutes. I dont want to display the seconds. I am new to Sql Server.

    Appreciate your help.

     

     

     

           

  • Basically, you will use some combination of convert, datename, datepart, and/or cast to format the date however you need to present it.  Here is a link to a good introductory article:

    http://www.sqljunkies.com/Article/6676BEAE-1967-402D-9578-9A1C7FD826E5.scuk

     


    Cheers,

    david russell

  • yes u can use convert function or u can use ltrim() as well to ur desired date result as u want.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply