![]() The following table illustrates the valid style and the corresponding format of the datetime after converting to a string. The value of style is a number predefined by SQL Server. sytle specifies the format of the date.datetime is an expression that evaluates to date or datetime value that you want to convert to a string.VARCHAR is the first argument that represents the string type.To convert a datetime to a string, you use the CONVERT() function as follows: CONVERT(VARCHAR, datetime ) Code language: SQL (Structured Query Language) ( sql ) Using the CONVERT() function to convert datetime to string Summary: in this tutorial, you will learn how to convert datetime to string in SQL Server using the CONVERT() function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |