cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Prathameshpatka
Helper IV
Helper IV

add days function doesn't work

Hi,

 

I am trying get the review date in compose function and add 30 days to the review date but the add days function fails continuously. The flow looks as below :

 

 

Capture.PNG

 

The compose function has the expression as formatDateTime(addDays(outputs('Review_Date'),30),'yyyy-MM-dd').

30 REPLIES 30
Hardesh15
Super User II
Super User II

@Prathameshpatka 

 

What happens to old thread?  if you are confused with addDays please use this action-

 

Hardesh15_0-1601918222004.png

 

Thanks

Hardesh

 

The add days didn't work for me. So just opened another thread separately for it. I now tried the action you had suggested but it gives the below error :

Capture.PNG

 

Capture.PNG

 

 

@Prathameshpatka 

 

Add one condition action here with logic Review Date output is not equal to null (type null in expression). Then add time action in Yes block on condition.

Hardesh15_0-1601918905412.png

 

Can you show me input of this step-

Hardesh15_0-1601919848830.png

 

 

Thanks

Hardesh

 

Hi,

 

I added that condition to the flow but it seems to be skipping as per what I have observed in the flow

 

 

 

The flow ran successfully but it shows as below . Although it skipped I still received that test email from the yes block

 

Capture.PNG

 

If I navigate to the 3rd page in review date it shows me the inputs and outputs. The date in the review date is incorrect though as I hadn't put that date in the document review date property.

 

Capture.PNG

@Prathameshpatka 

 

How many times your loop iterating? Dates in flow are in UTC. You have to manage date format as per your need. 

Pls share your review date and what kind of date format do you need?

 

Thanks

Hardesh

The flow shows it is iterating 6 times as per below screenshot ?

 

 

Capture.PNG

 

the review date on the document library is like below :

 

Capture.PNG

@Prathameshpatka 

 

In yes block use convert time zone action if you are not aware of expression and select your time format as you want.

 

If you still face any issue then i will give screens later.

 

Thanks

Hardesh

Hi,

 

 

I did add the convert time zone action as below in the flow :

 

Capture.PNG

 

The flow stills fails and show error as below :

 

Capture.PNG

 

@Hardesh15 

 

Currently I have this setup in the flow. I did try to format the date and time in the flow 

 

 

Capture.PNG

 

I get the below error when I run the flow :

 

Capture.PNG

@Prathameshpatka 

 

Please check output of review date compose in runing flow instance.

 

Can you check your number of rows in table matches with number of iterations in loop?

 

Is your excel date column contains time as well?

 

Thanks

Hardesh

@Hardesh15 

 

I just deleted all the files in the folder and created a new one post which I inputted the review date against the document as below :

 

Capture.PNG

 

But it the flow the review date gets picked up as below incorrectly :

 

Capture.PNG

 

Also can I trigger the flow only when a review date is entered against a file property? as for now it trigger whenever a file is created

 

@Prathameshpatka 

 

In format review date, you used addDays, change 31 to 30.

 

You can trigger flow based on column change. It is recently released by Microsoft

 

Thanks

Hardesh

@Hardesh15 

 

Although after using the add days function I was able add the 30 days to the review date but the review date column itself comes up with a date as 2020-10-06  even though my document in the document library has the date as 

 

Capture.PNG

 

 

The document in the document library has a date as 10/07/2020. So not sure why review date compose field pickups up a different date ?

 

Capture.PNG

@Prathameshpatka 

 

This is problem of time zone. I will give you complete screen in evening.

If anything else do yo want to mention pls add.

 

Thanks

Hardesh

@Hardesh15 

 

thank you ! It would be really helpful if you could provide screens.

 

Also can you let me know how can trigger the workflow on the column change that is once the review date is added in column.

@Hardesh15 

 

Did you had a chance to check the flow at your end ?

@Prathameshpatka 

 

please tell me which timezone you want to use? s flow used UTC time zone. Have you changed SharePoint Regional setting?

 

Thanks

Hardesh

@Hardesh15 

 

Let's keep the timezone as UTC. Also I haven't changed the any regional setting.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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.

Top Solution Authors
Top Kudoed Authors
Users online (3,105)