关于 sql:Default Day using to_Date with time only | 珊瑚贝

Default Day using to_Date with time only


我试图用今天的日期加上提供的时间(小时和分钟)在 oracle 中获取日期

查询是:

1
SELECT TO_DATE (’02:03′, ‘hh24:mi’) FROM dual

我对结果感到惊讶:

1
01/08/2017 02:03:00

似乎日期默认为每月 1 日(我在每月 3 日尝试过),但保留了月份和年份。

这是任何地方预期或记录在案的吗?

  • 这是默认行为。


我想你可以在这里找到答案

If you specify a date value without a date, then the default date is
the first day of the current month.

  • 谢谢你的回答。原来这个问题已经被问到stackoverflow.com/q/38637524/3997278


来源:https://www.codenong.com/45486221/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_10535.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?