Small Tricks and Tips : Power Automate – using addDays()

Small Tricks and Tips : Power Automate – using addDays()
Small Tricks and Tips : Power Automate – using addDays()

Hi All,

Greetings for the day!!!

Today new tip – using addDays() in Power Automate.

In Power Automate, recently got a chance to use addDays() so sharing.

Details

  • This function adds integer number of days to string timestamp passed to it
  • We could see this function under Date and time under Expressions in Dynamic Content dialog

Syntax:

addDays(timestamp: string, days: integer, format?: string)

where:
timestamp : datetime in which we need to add number of days
days: number of days need to be added in timestamp string
format: optional parameter - format of date which we need. It convert the DateTime into a specified format (i.e. dd-MM-yyyy, dd-MMMM-yyyy,etc) 

Power Automate - addDays() syntax and details
fig : Power Automate – addDays() syntax and details
Power Automate - addDays()
fig : Power Automate – addDays()

Demo :

  • In one of our project we need to update date field with tomorrows date – so Today() + 1 day
  • We have automated flow triggers on “When an item or file is modified” trigger
  • In our SharePoint list we have column – “Reviewer Assigned Date” of type Date and Time, which we need to update

addDays(utcNow(),1,'dd/MM/yyyy')

Power Automate - Using addDays() to SharePoint list column
fig : Power Automate – Using addDays() to SharePoint list column

Thanks for reading !!! Please feel free to discuss / suggestions / share thoughts !!!

HAVE A GREAT TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading