While trying to find 3rd saturday in invoke code Activity the following error?

The code is used with the invoke code activity

The code -

ThirdFriday = New DateTime(Year,Month,15)
While ThirdFriday.DayOfWeek <> DayOfWeek.Saturday
ThirdFriday = ThirdFriday.AddDays(1)
End While

Error

Find Third Saturday: No compiled code to run
error BC30561: ‘DayOfWeek’ is ambiguous, imported from the namespaces or types ‘System, Microsoft.Graph’. At line 2

Hi,

Can you try to add System. just before DayOfWeek as the following?

ThirdFriday = New DateTime(Year,Month,15)
While ThirdFriday.DayOfWeek <> System.DayOfWeek.Saturday
ThirdFriday = ThirdFriday.AddDays(1)
End While

Regards,

image

i have tried the same , but still

Hi,

Which version of Studio and System.Activities package do you use?

The following might help you.

Regards,

Yea it worked Thank you @Yoichi , upgraded

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.