Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"?

Which SQL statement displays the date March 19, 2001 in a format that appears as “Nineteenth of
March 2001 12:00:00 AM”?

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;



Leave a Reply 3

Your email address will not be published. Required fields are marked *


malik

malik

any body explain why A is wrong i tired on system A gets the right answer but not D.

dames

dames

A: Nineteenth of March 2001 12:0:0 AM
D: Nineteenth of March 2001 12:00:00 AM

Beny Morales

Beny Morales

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;