我有一varchar
列,我想转换yyyy-mm-dd hh:mi:ss
成mm-dd-yyyy hh:mi:ss
日期并将其转换为日期。怎么做到呢?
要将字符串转换为日期:
to_date (the_string, 'yyyy-mm-dd hh:mi:ss')
如果您随后希望将其格式化为字符串,格式为mm-dd-yyyy hh:mi:ss:
to_char (to_date (the_string, 'yyyy-mm-dd hh:mi:ss'), 'mm-dd-yyyy hh:mi:ss')
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句