English date format database date format conversion

WBOY
Release: 2016-07-29 08:33:52
Original
2709 people have browsed it

It is enough to specify the date format code in convert, such as:
select convert(char(20),getdate(),101)
select emp_id,convert(char(20),hire_dt,101) from employee
-- -------------------------------------------------- -
Date format                                                                                                                                                                                                  --------------- -----------
2000.04.05         102
------------------ -- -----------
05/04/2000 103
-------------------------------- --------- --
05.04.2000 104
-------------------------- -----------
05-04-2000 105
--- ------------------ ----------
05 Apr 2000 106
---------------- ---- -----------
Apr 05, 2000 107
-------------------------- -------- ---
11:33:24 108
----------------------------- -----------
Apr 5 2000 11:33: 24 109
-------------------------- -----------
04-05-2000 110
-------- ------------ -----------
2000/04/05 111
------------------ - -----------
20000405 112
The above introduces the English date format and database date format conversion, including the content of English date format. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!