Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle time 24h

-- FORMAT DATE TO STR
SELECT to_char(col_name, 'YYYY-MM-DD HH24:MI:SS') from tab_name;
-- CONVERT VARCHAR COL TO DATE
SELECT TO_DATE (col_name, 'YYYY/MM/DD HH24:MI:SS') from tab_name;
-- CONVERT STR TO DATE
SELECT TO_DATE (str, 'YYYY/MM/DD HH24:MI:SS') from DUAL;
 
PREVIOUS NEXT
Tagged: #oracle #time
ADD COMMENT
Topic
Name
8+2 =