So with the help of ,@v-yamao-msft, I have manged to get information on the leap years compose functions into flow, very helpful as per the below link.
The flow that uses the leap year compose functions is basically triggered on receipt of email from an initial flow that is sent requesting a new certificate. As I cannot expect my supplier to rename the certificate file in a specific format I have decided to check if the email address of the incoming email matches that of one in a SharePoint list, this works fine. I then need to test if the current expiry date is a leap year, and the rough and ready testing I have done works. It then gets the attachment of the email and saves this to a specific location, which works to. The basic flow looks like the below:
The issue I have is physically doing the leap year testing in its true sense. So, with a scenario of a current expiry of say 30/11/2018 this date is not a leap year, if I add 365 to that this is still not a leap year. However, if you add another 365, this will be a leap year so writing that date to a SharePoint list will result in the date being 29/11/2020 and not 30/11/2020 as it should be. So somehow, I need to have another compose action that maybe adds 365 days to the current expiry date and then test that against the other compose to determine it a leap year.
The next issue is I want to rename the suppliers certificate to something else, again the rough and ready testing I have done works. I suppose again I need to use the compose action above as the date field of the filename but then change this to say a UK GMT region format. I have done that before so that should not be a problem and have used the following:
convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd MM yyyy')
But the issue I will have is incorperating the new date somehow in a an expression of some form of compose.
So I need a little further helps please with the leap year side of things. The above has to be acheiveable, I do not think I am expecting too much.
I am afraid I have no way to see what the information provided in your screenshot is.
So I am not sure what your specific purpose is to determine if the date is a leap year.
What you mean is that the method to judge leap year is not working here, or you need more improvement to meet your Flow requirements.
If you are struggling to add 365 or 366, you could get the year of the next year and then use a similar method to determine if it is a leap year. If yes, add 366; if not, add 365
Please provide more details about your requirements, it seems that this post is only part of.
I am moving this all to the below post:
This will be maked as an accepted solution when the above post has been resolved. Sorry for cross posting never a good idea on this forum.
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.