将yyyy-mm-dd hh:mm:ss转换为hh:mm:ss AM/PM格式 [英] Convert yyyy-mm-dd hh:mm:ss to hh:mm:ss AM/PM format
本文介绍了将yyyy-mm-dd hh:mm:ss转换为hh:mm:ss AM/PM格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将yyyy-mm-dd hh:mm:ss转换为hh:mm:ss AM/PM格式
how to Convert yyyy-mm-dd hh:mm:ss to hh:mm:ss AM/PM format
推荐答案
只需使用转换功能
Simply use convert function
CONVERT(VARCHAR(10) ,datecolumn ,108)
除非您有其他要求,否则应该可以完成这项工作.
Unless you have some other requirement, this should do the job.
这篇关于将yyyy-mm-dd hh:mm:ss转换为hh:mm:ss AM/PM格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文