I'm creating a power automate workflow that will automatically get the list of people that has a vacation leaves in a week from a sharepoint calendar and it will send that list to me via email. I was able to get that output, but the date includes the time. I only want the time so I tried to fixed it using the initialize variable but I am getting an error. "InvalidTemplate. Unable to process template language expressions in action 'Initialize_variable' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'."
I tried this expression
if( empty(item()?['EventDate']), null, formatDateTime(utcnow()[item()?['EventDate']], 'MMM-dd-yyyy') )
and the workflow run with no error, but the output only gives me the EndDate. The StartDate is blank or no dates on StartDate.
Any suggestions?
See my current workflow.
