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!

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,660)