I have performed a partial restore of a page in my local CMS from the dev environment on Umbraco cloud. The same exact page when viewed on the dev site displays the content just fine, but when I try and view the same pulled down content on my local copy I get a DateTime conversion error (see below). Has anyone else experienced this and if so what was the resolution?
An error occurred
Cannot assign value "23/06/2023 00:00:00" of type "System.String" to property "effectiveDate" expecting type "System.DateTime".
Exception Details
System.InvalidOperationException, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Cannot assign value "23/06/2023 00:00:00" of type "System.String" to property "effectiveDate" expecting type "System.DateTime".
k
Kaspar Boel Kjeldsen
07/29/2024, 2:16 PM
likely due to a mismatch in the date format between your local environment and the dev environment. are you running the same culture locally as on the cloud ?
k
knightyknight
07/29/2024, 2:22 PM
The local project is a pull down from the Umbraco cloud dev site so it should match
k
Kaspar Boel Kjeldsen
07/29/2024, 2:25 PM
Does your model match? Is EffectiveDate a datetime value on your documentType/elementType both local and dev ?
k
knightyknight
07/29/2024, 3:16 PM
Yes, on both local and dev they are a "Date/Time Umbraco.DateTime"