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

Date comparing formula ignores year

Hi,

I've got formula for comparing dates and sending remind email 2 weeks before deadline (date in text format in sharepoint list column - format "yyyy-mm-dd").

Formula:

formatDateTime(outputs('Compose'), 'yyyy-MM-dd')
IS EQUAL 
formatDateTime(addDays(utcNow(),14),'yyyy-MM-dd')

 

Flow works fine but only matching months and days, so it sending mi reminder 2 weeks before this date -> "2020-11-30".

Could you help me fix that one, please?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi @nottheOther 

 

I think I have a solution for you. Please check if this works and if not, please let me know, and we'll figure this out.

 

small-Screenshot_2019-11-25_at_11_21_36.jpg

 

Formula for the first compose

formatDateTime(triggerBody()['text'],'yyyy-MM-dd')

 

 

Formula for the second compose

addDays(outputs('Input_Date'),-14)

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

1 REPLY 1
Super User II
Super User II

Hi @nottheOther 

 

I think I have a solution for you. Please check if this works and if not, please let me know, and we'll figure this out.

 

small-Screenshot_2019-11-25_at_11_21_36.jpg

 

Formula for the first compose

formatDateTime(triggerBody()['text'],'yyyy-MM-dd')

 

 

Formula for the second compose

addDays(outputs('Input_Date'),-14)

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (25,871)