cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Huntson
Frequent Visitor

Date + 1 year output on excel

Hi,

 

Im being stuck for a while now trying to resolve this challenge so I though that maybe someone could give me a hand here 🙂 

 

Im trying to build a flow to add a row into an excel table using values submitted from an online form. Until here all good. The form sends 3 values (Date, Number, Question) which I can add to the excel row.

 

However, the challenge arise when I created a new column called "Expiring" in which I'm trying to input the value received in the "Date" + 1 year. (see image) I can't get any of the formulas for that to work. 

 

 flow.png

 

Any help would be much appreciate it. 

 

Huntson

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Huntson 

 

Can you try this: 

 

addDays(outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156'],365)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

6 REPLIES 6
yashag2255
Dual Super User II
Dual Super User II

Hi @Huntson 

 

You will have to use the expression editor for that. Place the cursor in the double quotes for the expiring key and then shift to expression editor. Here, you can search for adddaysfunction and then your expression will be adddays('selectTheExpringResponseFromDynamicSelectorHere',1)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 

 

Many thanks for your response. I've tried using expressions but it seems that I may be doing something wrong. This is the formula Im trying which gives me an error.:

 

addDays(outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156'],365:outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156'])

 

Where "Date" value from the form = outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156']

 

Could be before the form value format is incompatible with the formula? 

 

Thanks

yashag2255
Dual Super User II
Dual Super User II

Hi @Huntson 

 

Can you try this: 

 

addDays(outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156'],365)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

That worked very nicely. Thanks a lot @yashag2255 

I assume that I can now format the date output?  

addDays(outputs('Get_response_details')?['body/r67a5db9219eb468ba2cbb62bfe5b8156'],365:mm-MM-yyyy) 

 

Thanks

 

yashag2255
Dual Super User II
Dual Super User II

Hi @Huntson 

 

Yes. Also, note that the date time column works a bit differently in Excel. You can refer to this post for more details: https://www.bythedevs.com/post/working-with-date-time-data-of-excel-in-power-automate

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Is there a way to express 1 year instead of 365 days? After a leap year, the 365 days would be off by one day. I need a 1 year inteval that adjusts to leap years.

 

Anne

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,582)