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

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

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

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!

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

 

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!

annetoal
Continued Contributor
Continued Contributor

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,090)