nerdexam
SAP

C_BOWI_40 · Question #129

Which combination of functions should you use to convert the string "13/11/46 12:00:00 AM" to "Wednesday 13 Nov 1946"?

The correct answer is B. SubStr() using Pos(), ToDate(), FormatDate(). This question tests knowledge of SAP BusinessObjects Web Intelligence string and date functions needed to extract a date substring and reformat it.

Using Formulas and Variables

Question

Which combination of functions should you use to convert the string "13/11/46 12:00:00 AM" to "Wednesday 13 Nov 1946"?

Options

  • ARight() using Pos(), ToDate(), FormatDate()
  • BSubStr() using Pos(), ToDate(), FormatDate()
  • CRight() using Pos(), CurrentDate(), FormatDate()
  • DSubStr() using Pos(), CurrentDate(), FormatDate()

How the community answered

(33 responses)
  • A
    9% (3)
  • B
    64% (21)
  • C
    21% (7)
  • D
    6% (2)

Why each option

This question tests knowledge of SAP BusinessObjects Web Intelligence string and date functions needed to extract a date substring and reformat it.

ARight() using Pos(), ToDate(), FormatDate()

Right() extracts characters from the rightmost end of the string, which would return '12:00:00 AM' not the date portion, making it the wrong function for this extraction.

BSubStr() using Pos(), ToDate(), FormatDate()Correct

SubStr() combined with Pos() is needed to extract the date portion '13/11/46' from the middle of the full string, since the date does not start at the first character and Right() would extract from the end. ToDate() then converts that extracted string into a date object, and FormatDate() applies the target format 'Wednesday 13 Nov 1946'.

CRight() using Pos(), CurrentDate(), FormatDate()

Right() is incorrect for extracting the date portion, and CurrentDate() returns today's system date rather than converting the date embedded in the source string.

DSubStr() using Pos(), CurrentDate(), FormatDate()

CurrentDate() returns today's date and ignores the date value inside the source string, so the conversion would not produce '13 Nov 1946'.

Concept tested: Web Intelligence string extraction and date conversion functions

Source: https://help.sap.com/docs/SAP_BUSINESSOBJECTS_BUSINESS_INTELLIGENCE_PLATFORM/1fd2fc7d3a6e45c982b82e75ca8e0c6f/46d8c2ff6e041014910eff47ad148e3b.html

Topics

#SubStr#Pos#ToDate#FormatDate

Community Discussion

No community discussion yet for this question.

Full C_BOWI_40 Practice