Raj-302673
SSC Enthusiast
Points: 176
More actions
February 27, 2006 at 2:33 am
#167242
Hi,
I wants to convert string to date so got a function getdate:
convert(varchar,getdate(),120)
Whats this number 120 means...
SQLZ
SSChampion
Points: 12872
February 27, 2006 at 3:55 am
#623410
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,
Karlsource control for SQL Server
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply