0

Is it possible to add suffix (ordinal) in email body of "Send an email (V2)" action in power automate?

Expected Date format - "July 20th, 2021".

I am trying to add suffix "st, nd, rd and th" in date/time format.

If it is possible, can someone please guide me.

Thanks.

0

It is possible to add the suffixes to the numbers between 1-31. These are the steps:

Initialize variable Date_Suffix and assig it to th:

enter image description here

Add a compose action to extract a day number using a dayOfMonth() function:

enter image description here

Add the following 3 conditions that overwrite the Date_Suffix's value:

enter image description here

enter image description here

enter image description here

Finally, get the user-friendly date format using this formula:

@{formatDateTime(utcNow(),'MMMM d')}@{variables('Date_Suffix')},  @{formatDateTime(utcNow(),'yyy')}

enter image description here

Result:

enter image description here

Could we do it in fewer steps? Yes, but I am just showing a quick and dirty approach that is easy to read and understand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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