Getdate Function

  • Hi,

        I wants to convert string to date so got a function getdate:

          convert(varchar,getdate(),120)

        Whats this number 120 means...


    Thanks & Regards,
    Raj

  • The number 120 relates to the style you want to apply. In this case, it is yyyy-mm-dd hh:mi:ss(24h).

    Have a look in books online for CAST and CONVERT. It will give you a list of all the available styles.

    hope that helps,

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

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