时间显示yyy/m/d
时间: 2023-08-25 09:06:39 浏览: 190
显示时间和日期
时间显示为yyy/m/d可以使用COVERT函数将日期类型转换为varchar类型,并指定格式为yyyy/MM/dd。例如,可以使用以下SQL语句将日期字段date_date转换为指定格式的字符串并存储到date_new字段中:
UPDATE t_test SET date_new = (SELECT CONVERT(varchar(10), date_date, 111))
其中,111表示日期格式为yyyy/MM/dd。
#### 引用[.reference_title]
- *1* [SQL SERVER 批量修改时间由yyyy/MM/dd转为yyyy-MM-dd](https://blog.csdn.net/Beuty_Chen/article/details/110072864)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [EXCEL如何批量将日期格式:yyyy/m/d 修改为:yyyy/mm/dd](https://blog.csdn.net/weixin_38553770/article/details/106195201)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [星期几—YYYY-MM-DD,表示一个日期,你知道是星期几吗?](https://blog.csdn.net/m0_64782700/article/details/123067705)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文