1

I have a value startOfMonth(addToTime(utcNow(), -1, 'Month')) in Create File action in Microsoft flow. It gets the first date of the month and names the file as 2020-01-01T00_00_00.0000000Z.html.

However, I want it to just give the date as 01/01/2020 which doesn't include the rest of the digits.

Thank you.

3
  • 1
    Try using formatDateTime(startOfMonth(addToTime(utcNow(), -1, 'Month')),'dd/MM/yyyy') and let me know if this works for you. Feb 24, 2020 at 10:58
  • Hi Ganesh. It worked. Thank you. Can you answer this. So that I can mark this as answered?
    – Noman
    Feb 24, 2020 at 11:03
  • 1
    Great. added as an answer below. please upvote and mark as answered. Feb 24, 2020 at 11:06

1 Answer 1

2

Try using this formula:

formatDateTime(startOfMonth(addToTime(utcNow(), -1, 'Month')),'dd/MM/yyyy')
3
  • Done Ganesh. Just wondering If I can add months name for example January's report instead of this. Is it possible? I mean it gets the name of each month exactly as the same but in the output ( File name) will be like January Monthly report?
    – Noman
    Feb 24, 2020 at 11:09
  • 1
    That will need some more calculations,. Check this. it covers what you are seeking. Feb 24, 2020 at 11:12
  • 1
    Ok cheers my friend. Appreciate it.
    – Noman
    Feb 24, 2020 at 11:31

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.