在DB2中
date
没有时间成分。
所以,试试吧
to_timestamp()
:
select to_timestamp(‘10-Feb-2019 11:20’, ‘DD-Mon-yyyy hh24:mi’)
</code>
请注意,秒不在字符串值中,因此它们不应该在格式规范中。但是,最终值将有秒 - 全部设置为零。
好的,我能够解决它。
我想将字符串“10-Feb-2019 11:20”转换为“DD-mm-yyyy hh24:mi:ss”。
我试过约会,但它没有用。我在其他线程上看到了翻译功能……