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

@Prathameshpatka 

 

Whatever time you see on flow is UTC time and when you input time in SharePoint column, it converts your Date and Time based on regional settings. Please go to site setting and check your regional setting.

 

Thanks

Hardesh

@Hardesh15 

 

The site regional setting is as below :

 

Capture.PNG

 

If possible could you please get me some screens.

@Hardesh15 

 

Sorry here is the screenshot

 

Capture.PNG

@Prathameshpatka 

 

See now- There is time difference of 1 hour.

Hardesh15_0-1602167514691.png

Hardesh15_1-1602167603998.png

 

you need to add 1 hr in review date compose- addHours(Your Date Time column,1,'yyyy-MM-dd')

 

Thanks

Hardesh

 

@Hardesh15 

 

I am getting a weird issue now. When I type in an expression I am not able get the review date column in dynamic content

 

Capture.PNG

 

Without the expression the column comes up 

 

Capture.PNG

@Prathameshpatka 

 

This is not weird issue. it is functioning of loop which is restricting you while using expression. Solution- Add one more compose and pass review date in it. Then in another compose action use addHours(compose output,1,'yyyy-MM-dd').

 

Thanks

Hardesh

 

@Hardesh15 

 

This goes well now. What format I should use in Delay until as I want to delay until the calculated time that is 2020-11-06 from above and then send email when that date reaches.

 

Capture.PNG

@Prathameshpatka 

 

See error- it is saying date format should be in UTC. your date format is not in UTC.

Hardesh15_0-1602172879777.png

 

Thanks

Hardesh

 

@Hardesh15 

 

The flow now keeps running for hours not sure why also the document library has two documents as below with a review date :

 

Capture.PNG

 

Capture.PNG

 

Can you let me know what went wrong here ? Also how can I trigger the workflow only when a review date is put in against the document ?

@Prathameshpatka 

Are you using delay until inside loop? 

 

Thanks

Hardesh

@Hardesh15 

 

I am using the delay until inside the if condition as I want it to run once that condition is satisfied :

 

Capture.PNG

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (10,412)