Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将字符串转换为日期时间?我需要能够从实际日期字段中减去此字符串。
2013-01-01 06:21:31
使用TO_DATE功能:
TO_DATE
TO_DATE(column, 'YYYY-MM-DD HH24:MI:SS')
或者,如果它只是一个字符串文字:
TO_DATE('2013-01-01 06:21:31', 'YYYY-MM-DD HH24:MI:SS')