nerdexam
Oracle

1Z0-061 · Question #36

You want to display the date for the first Monday of the next month and issue the following command: What is the outcome?

The correct answer is A. It executes successfully and returns the correct result. NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string. - LAST_DAY(date): Finds the date of the last day of the month that contains date The second…

Install and Administer Oracle RAC

Question

You want to display the date for the first Monday of the next month and issue the following command:

What is the outcome?

Options

  • AIt executes successfully and returns the correct result.
  • BIt executes successfully but does not return the correct result.
  • CIt generates an error because TO_CHAR should be replaced with TO_DATE.
  • DIt generates an error because rrrr should be replaced by rr in the format string.
  • EIt generates an error because fm and double quotation marks should not be used in the format string.

How the community answered

(20 responses)
  • A
    80% (16)
  • B
    5% (1)
  • C
    5% (1)
  • E
    10% (2)

Explanation

  • NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string. - LAST_DAY(date): Finds the date of the last day of the month that contains date The second innermost function is evaluated next. TO_CHAR('28-OCT-2009', 'fmMonth') converts the given date based on the Month format mask and returns the character string October. The fm modifier trims trailing blank spaces from the name of the month.

Topics

#NEXT_DAY#TO_CHAR#date functions#format strings

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice