Wednesday, 19 November 2025

Workflow failing on 29 Feb 2025

 Funny New error for me today.


The SharePoint list date needs to be increased by 1 year. Seems simple, right. 


However last year this item was done on 29 Feb on a Leap year, and there is no 29 Feb this year, so the Workflow is failing to update the year, because the year is invalid.


Error message: 

The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.


The Fix

Do a simple replace of the Date String

replace({DataString},'-02-29','-02-28')