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 Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

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

%d bloggers like this: