Question 57 of 103 from exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer

Question 57 of 103 from exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer

Question

HOTSPOT - You have the following code:

public void CompareValues()
{
Date myDate = str2date('01/08/1901' ,123);
boolean result1, result2, result3;
result1 = (myDate + 1 == str2date('02/08/1901", 123));
result2 = (str2Date(int2str(date2Num(myDate)),123) + 1 == str2date('02/08/1901", 123);

For each of the following statements, select Yes if the statement is true.

Otherwise, select No.

NOTE: Each correct selection is worth one point.

Hot Area:

Answer Area

Statement

The value of result1 =true

The value of result2 = true

Explanations

Answer Area

Statement

The value of result1 =true

The value of result2 = true

Box 1: Yes - Add 1 to a date adds one day.

Box 2: No - Date2num converts a date to an integer that corresponds to the number of days since January 1, 1900 so this would give us a large number.

Int2str converts the large number into a string.

Str2date converts a string to a date.However, the large number would not be in the correct format for a date.

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/types-of-fields https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-conversion-run-time-functions