I am using 'Create a task' flowstep to generate tasks in a Microsoft Planner. But sometimes I do not want to enter a date value for the start or end date. It depends on a variable being entered or not. I use the following expression:
if(empty(variables('StartTime')),null,variables('StartTime'))
It returns a 400 error, bad request, stating that it was impossible to convert null to a datetime, which is correct. But I do not want to enter anything at all. I've also tried the following:
if(empty(variables('StartTime')),'',variables('StartTime'))
Same result, only this time it couldnt convert the empty string. Funny thing is, when I do not enter anything at all, it seems to be fine.
How do I go about making these datefields variably entered or left empty?