Hello @Van Haver, Jan - Thanks for reaching out!
You can use the coalesce
function to replace null values with a default value. In this case, you can replace null values with a minimum date value supported by Dataverse. The minimum date value supported by Dataverse is January 1, 1753, 00:00:00. You can use the DateTime.Parse
method to convert the date string to a DateTime object. Here's an example of how to use the coalesce
function to replace null values with a minimum date value:
coalesce(parseDateTime(body('Parse_JSON')?['TerminationDate']), DateTime.Parse("1753-01-01T00:00:00Z"))
In this example, body('Parse_JSON')?['TerminationDate']
is the date string that you want to convert to a DateTime object. The parseDateTime
function converts the date string to a DateTime object. The coalesce
function checks if the result of the parseDateTime
function is null. If it is null, the function returns the minimum date value supported by Dataverse.
You can use this expression in the "Create a row" or "Update a row" action to process null values for date columns in Dataverse.
For more information on the coalesce
function and the parseDateTime
function, you can refer to the following Azure documentation:
I hope this helps! Let me know if you have any further questions.