nerdexam
Oracle

1Z0-548 · Question #14

If acp_service_start_date is 15-Aug-2005 and calculation_date is l-Aug-2010, what will effective_start_date set to at the end of the snippet below?

The correct answer is D. 15-Aug-2009. Option D is correct because the snippet calculates the most recent yearly anniversary of acp_service_start_date that falls on or before calculation_date. The 5th anniversary (15-Aug-2010) hasn't occurred yet as of 1-Aug-2010, so the code rolls back to the 4th anniversary…

Employee Management

Question

If acp_service_start_date is 15-Aug-2005 and calculation_date is l-Aug-2010, what will effective_start_date set to at the end of the snippet below?

Options

  • A15-Aug-2010
  • B01-Aug-2010
  • C15-Aug-2005
  • D15-Aug-2009

How the community answered

(42 responses)
  • A
    12% (5)
  • B
    5% (2)
  • C
    7% (3)
  • D
    76% (32)

Explanation

Option D is correct because the snippet calculates the most recent yearly anniversary of acp_service_start_date that falls on or before calculation_date. The 5th anniversary (15-Aug-2010) hasn't occurred yet as of 1-Aug-2010, so the code rolls back to the 4th anniversary: 15-Aug-2009.

  • A (15-Aug-2010) is wrong - this is the next upcoming anniversary, which is still in the future relative to 1-Aug-2010, so the condition >= calculation_date hasn't been satisfied.
  • B (01-Aug-2010) is wrong - this is simply the calculation_date itself; the result must be an anniversary of the service start date, which always falls on the 15th.
  • C (15-Aug-2005) is wrong - this is the original service start date and would only be correct if no anniversaries had passed at all.

Memory tip: Think of it like a birthday rule - "How old was I on my last birthday?" On 1-Aug-2010, the service hasn't yet hit its 5th birthday (15-Aug-2010), so you credit the 4th (15-Aug-2009). Always find the most recent past anniversary, never a future one.

Topics

#Effective dating#Service dates#Date calculations#Employee master data

Community Discussion

No community discussion yet for this question.

Full 1Z0-548 Practice