web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power automate desktop
Power Automate
Answered

Power automate desktop

(0) ShareShare
ReportReport
Posted on by

how to calculate last Friday date in power automate desktop 

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Meenakshi11 

     

    Do you want last friday of the month or last friday of the current date?

  • Meenakshi11 Profile Picture
    on at

    last Friday date of current date in power automate desktop 

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Meenakshi11 

     

    Please follow the below approach:

    Deenuji_0-1716385273231.png

     

    code(copy and paste into your power automate desktop):

    DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
    SET Day TO CurrentDateTime.DayOfWeek
    LOOP WHILE ($'''True''') = ($'''True''')
     IF CurrentDateTime.DayOfWeek <> $'''Friday''' THEN
     DateTime.Add DateTime: CurrentDateTime TimeToAdd: -1 TimeUnit: DateTime.TimeUnit.Days ResultedDate=> CurrentDateTime
     ELSE
     Display.ShowMessageDialog.ShowMessage Title: $'''Info''' Message: CurrentDateTime Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
     EXIT LOOP
     END
    END

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard