1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Format function in query

Discussion in 'SQL Server' started by shukla, Jul 5, 2009.

  1. shukla

    shukla New Member

    Hi All!
    I am new to sql server 2005
    I want to use format function in sql query
    How to use it ?:nonod:
    Also for numbers, format(no1,"0.00") :crazy:
  2. shabbir

    shabbir Administrator Staff Member

    What is your input format and what you would like the output to be formatted.
  3. shukla

    shukla New Member

    My database contains dt as "datetime" type.
    I want it in format as dd-mmm-yyyy
  4. naimish

    naimish New Member

    MS SQL Server 2005 provides CONVERT function to change or convert the DateTime formats.

    CONVERT Function syntax:

    Convert (datatype, datetime string, date style)

Share This Page