nerdexam
SAP

C_BOWI_40 · Question #142

Which two statements describe reasons for using the FormatDate() function?

The correct answer is B. You want to convert a date object into a string object. C. You want to format a date so that it is displayed as a string when it is concatenated with another. FormatDate() converts a date object into a formatted string, making it necessary when displaying dates in custom formats or concatenating dates with other strings.

Using Formulas and Variables

Question

Which two statements describe reasons for using the FormatDate() function?

Options

  • AYou want to convert a string object into a date object.
  • BYou want to convert a date object into a string object.
  • CYou want to format a date so that it is displayed as a string when it is concatenated with another
  • DYou want to modify the format of a string object into a non-standard date format.

How the community answered

(51 responses)
  • A
    8% (4)
  • B
    88% (45)
  • D
    4% (2)

Why each option

FormatDate() converts a date object into a formatted string, making it necessary when displaying dates in custom formats or concatenating dates with other strings.

AYou want to convert a string object into a date object.

Converting a string into a date object is accomplished with the ToDate() function, which is the inverse operation; FormatDate() only converts from date to string.

BYou want to convert a date object into a string object.Correct

FormatDate() takes a date object and a format pattern as arguments and returns the date as a string object, enabling developers to control exactly how a date value is displayed to the end user.

CYou want to format a date so that it is displayed as a string when it is concatenated with anotherCorrect

Web Intelligence requires both operands of a string concatenation to be string types; FormatDate() is used to convert the date object into a string so it can be joined with other string values without a data type error.

DYou want to modify the format of a string object into a non-standard date format.

FormatDate() operates exclusively on date objects, not string objects; reformatting a string representation of a date would require first converting it to a date object with ToDate().

Concept tested: FormatDate() function - date to string conversion

Source: https://help.sap.com/viewer/ad62de02-ba29-44fb-88c3-2cb1a7f5c659/4.2/en-US

Topics

#FormatDate()#date to string conversion#string concatenation#date functions

Community Discussion

No community discussion yet for this question.

Full C_BOWI_40 Practice