Some function records of Oracle to_char.
1. Convert to year, month, day, hour, minute, and second;
2. Turning it into a subtle operation
SQL> select to_char (systimestamp, 'yyyy-mm-dd-hh24: mi: ss. ff') from dual;
TO_CHAR (SYSTIMESTAMP, 'yyyy-MM-
------------------------------
2013-09-26-16:08:04. 234000
Note that the parameter format is not converted to millisecond.
If you want to convert it to milliseconds
SQL> select to_char (systimestamp, 'yyyy-mm-dd-hh24: mi: ss. ff3') from dual;
TO_CHAR (SYSTIMESTAMP, 'yyyy-MM-
------------------------------
2013-09-26-16:12:10. 640
3. The number of seconds from the point to the current time
SQL> select to_char (systimestamp, 'yyyymmddhh24miss -- ssss') from dual;
TO_CHAR (SYSTIMESTAMP, 'yyyymmdd
------------------------------
20130926160938 -- 58178
SQL> select to_char (systimestamp, 'yyyy-mm-dd-hh24: mi: ss '),
2 to_char (systimestamp, 'yyyymmddhh24miss -- ssss '),
3 to_char (systimestamp, 'hh24') * 60*60 +
4 to_char (systimestamp, 'mi') * 60 + to_char (systimestamp, 'ss') +
5 to_number (to_char (systimestamp, 'ff')/1000000.00)
6 from dual
7/
TO_CHAR (SYSTIMESTAMP, 'yyyy-MM-TO_CHAR (SYSTIMESTAMP, 'yyyymmdd TO_CHAR (SYSTIMESTAMP, 'hh24') * 6
------------------------------------------------------------------------------------------
2013-09-26-16:00:13 20130926160013 -- 57613 57613
Other parameters are shown in the following table:
Convert the date format of objective-c in other languages. For details, refer
Http://userguide.icu-project.org/formatparse/datetime