Which SQL statement displays the date March 19, 2001 in a format that appears as “Nineteenth of
March 2001 12:00:00 AM”?
A.
SELECT
TO_CHAR(TO_DATE(’19-Mar-2001′, ‘DD-Mon-YYYY’), ‘fmDdspth “of” Month YYYY HH:MI:SS
AM’) NEW_DATE
FROM dual;
B.
SELECT
TO_CHAR(TO_DATE(’19-Mar-2001′, ‘DD-Mon-YYYY’), ‘Ddspth
“of” Month YYYY fmHH:MI:SS AM’) NEW_DATE
FROM dual;
C.
SELECT
TO_CHAR(TO_DATE(’19-Mar-2001′, ‘DD-Mon-YYYY’), ‘fmtDdspth “of” Month YYYY fmtHH:MI:SS
AM’) NEW_DATE
FROM dual;
D.
SELECT
TO_CHAR(TO_DATE(’19-Mar-2001′, ‘DD-Mon-YYYY’), ‘fmDdspth
“of” Month YYYY fmHH:MI:SS AM’) NEW_DATE
FROM dual;
any body explain why A is wrong i tired on system A gets the right answer but not D.
A: Nineteenth of March 2001 12:0:0 AM
D: Nineteenth of March 2001 12:00:00 AM
This is the answer
SELECT TO_CHAR(TO_DATE(’19-Mar-2001′, ‘DD-Mon-YYYY’), ‘fmDdspth “of” Month
YYYY fmHH:MI:SS AM’) NEW_DATE FROM dual;