oracle to_date 格式化的格式与数据库格式不一致,但是还是能正确格式化?

图片说明

可以的,to_char to_date这类函数都会正确的转化为规范的数据结构。

LOG_TIME最开始的格式是什么?

主要看看粗体字:
Oracle Database converts strings to dates with some flexibility. For example, when the TO_DATE function is used, a format model containing punctuation characters matches an input string lacking some or all of these characters, provided each numerical element in the input string contains the maximum allowed number of digits—for example, two digits '05' for 'MM' or four digits '2007' for 'YYYY'. The following statement does not return an error:
SELECT TO_CHAR(TO_DATE('0207','MM/YY'), 'MM/YY') FROM DUAL;

TO_CH

02/07

However, the following format string does return an error,** because the FX (format exact) format modifier requires an exact match of the expression and the format string**:
SELECT TO_CHAR(TO_DATE('0207', 'fxmm/yy'), 'mm/yy') FROM DUAL;
SELECT TO_CHAR(TO_DATE('0207', 'fxmm/yy'), 'mm/yy') FROM DUAL;
*
ERROR at line 1:
ORA-01861: literal does not match format string

Any non-alphanumeric character is allowed to match the punctuation characters in the format model. For example, the following statement does not return an error:
SELECT TO_CHAR (TO_DATE('02#07','MM/YY'), 'MM/YY') FROM DUAL;

TO_CH

02/07

加了粗体字,没法在网页显示?