0

I have a flow that sends an email to an item's original submitter. In this email I need to display the Item's Created Date AND Time. I'm looking to display something like "11/14/2023 2:40pm". None of the formatting I've tried in the flow seem to work. Could someone please help me format this? I'm assuming I need to either use the Compose action, or set a variable. I haven't been able to get this right yet.

Any help would be appreciated.

Thanks!

1 Answer 1

1

According to the documentation, you can use formatDateTime.

For example, to inject the Created date of a new SharePoint item in a variable of type string:

formatDateTime(triggerOutputs()?['body/Created'], 'MM/dd/yyyy h:mm tt')

or, with the g format:

formatDateTime(triggerOutputs()?['body/Created'], 'g')

formatDateTime definition formatDateTime result

1
  • Perfect! Thank you. I used the first method you listed.
    – Chris
    Nov 14 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.