Hi All,
I have a need to set a field to the first Wednesday of the month after a date specified in a date picker. The field will not be visible, and it could be a Date/Time type, or a Single Line of Text type. It will be stored in a Sharepoint list, so that field can change to match the Power App approach. Or the calculation could be done in Sharepoint.
I found the following (which works for the first Friday of the next month) on another forum,
=IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=1;DATE(YEAR(Data1);MONTH(Data1)+1;1+1);IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=7;DATE(YEAR(Data1);MONTH(Data1)+1;1+2);IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=6;DATE(YEAR(Data1);MONTH(Data1)+1;1+3);IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=5;DATE(YEAR(Data1);MONTH(Data1)+1;1+4);IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=4;DATE(YEAR(Data1);MONTH(Data1)+1;1+5);IF(WEEKDAY(DATE(YEAR(Data1);MONTH(Data1)+1;1))=3;DATE(YEAR(Data1);MONTH(Data1)+1;1+6);DATE(YEAR(Data1);MONTH(Data1)+1;1)))))))
an adapted it in various ways, but I could not get it to work. Among my issues:
- attempting to create a calculated field in Sharepoint: formula too long - it was truncated,
- attempted to place in the default value of a Date/Time field in Power Apps
- attempted to place in a "Single Line of Text" field in Power Apps
- attempted to place as text in a label in Power Apps.
The Power App errors were too long to correct!
Nothing worked. Any help would be greatly appreciated!