Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sql how to convert time type to string type

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how sql converts the time type to the string type". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how sql converts the time type to the string type.

Date-time transfer string

The copy code is as follows:

Select CONVERT (varchar), GETDATE (), 0): 05 16 2006 10:57AM Select CONVERT (varchar (100), GETDATE (), 1): 05 varchar 16 Select CONVERT (varchar), GETDATE (), 2): 06.05.16 Select CONVERT (varchar, GETDATE (), 3): 16-05-06 Select CONVERT (varchar (100), GETDATE (), 4): 16.05.06 Select CONVERT (varchar (100), GETDATE (), 5): 16-05-06 Select CONVERT (varchar GETDATE (), 6): 16 05 06 Select CONVERT (varchar, GETDATE (), 7): 05 16,06 Select CONVERT (varchar, GETDATE (), 8): 10:57:46 Select CONVERT (varchar, GETDATE (), 9): 05 16 2006 10:57:46:827AM Select CONVERT (varchar, GETDATE (), 10): 05-16-06 Select CONVERT (varchar, GETDATE (), 11): 06GETDATE (varchar), GETDATE () 12): 060516 Select CONVERT (varchar, GETDATE (), 13): 16 05 2006 10 GETDATE (), 14): 10 varchar (100), GETDATE (), 14): 10 Select CONVERT 57 46 Select CONVERT (varchar), GETDATE (), 20): 2006-05-16 10:57:47 Select CONVERT (varchar, GETDATE (), 21): 2006-05-16 10 57 Select CONVERT (varchar), GETDATE () 22): 05 AM Select CONVERT 16 06 10:57:47 AM Select CONVERT (varchar), GETDATE (), 23): 2006-05-16 Select CONVERT (varchar), GETDATE (), 24): 10:57:47 Select CONVERT (varchar, GETDATE (), 25): 2006-05-16 1057 GETDATE 47.25 Select CONVERT (varchar, GETDATE, 100): 05 16 2006 10:57AM Select CONVERT (varchar, GETDATE): 0516 Select CONVERT GETDATE (): 2006.05.16 Select CONVERT (varchar, GETDATE (), 1010): 16.05.2006 Select CONVERT (varchar, GETDATE (), 2006): 16-05-2006 Select CONVERT (varchar, GETDATE): 1605 2006 Select CONVERT (varchar, GETDATE (), 107): 05 16,2006 Select CONVERT (varchar (100), GETDATE () 10:57:49 Select CONVERT (varchar, GETDATE): 0516 2006 10:57:49:437AM Select CONVERT (varchar, GETDATE): 05-16-2006 Select CONVERT (varchar, GETDATE): 2006-05-16 Select CONVERT (varchar, GETDATE): 20060516 Select CONVERT (varchar, GETDATE,): 16 05 2006 1015 10:57:49:437AM Select CONVERT (varchar), GETDATE () Varchar: 2006-05-16 10:57:49 Select CONVERT (varchar, GETDATE, 121l): 2006-05-16 1015 Select CONVERT 5749.700 Select CONVERT (varchar, GETDATE): 2006-05-16T10:57:49.827 Thank you for your reading The above is the content of "how sql converts the time type to the string type". After the study of this article, I believe you have a deeper understanding of how sql converts the time type to the string type. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report