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 / Calculate days until s...
Power Automate
Unanswered

Calculate days until salary day every day

(0) ShareShare
ReportReport
Posted on by 4

Hello 

 

How do I create an automation in Power Automate to daily send the days remaining until payday, knowing that the payday is on the 11th of each month, and if this day falls on Saturday or Sunday, we will receive the salary earlier, i.e., on Friday. The remaining days should be sent on email to all colleagues and to TEAMS on a channel . 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexandruV ,

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1703483593455.png

    vyetonggumsft_9-1703485464775.png

    int(utcNow('dd'))
    int(30)
    sub(outputs('Compose-Today'),outputs('Compose-SalaryDay'))
    parseDateTime(concat(split(formatDateTime(utcNow('yyyy-MM')),'-')[0],'-',split(formatDateTime(utcNow('yyyy-MM')),'-')[1],'-',outputs('Compose-SalaryDay')),'en-us','yyyy-MM-dd')
    dayOfWeek(outputs('Compose-formatSalaryDate'))

    vyetonggumsft_3-1703484129176.png

    outputs('Compose-DateDiffer')
    int(-2)
    outputs('Compose-dayOfWeek')
    mul(outputs('Compose-DateDiffer'),-1)

    vyetonggumsft_4-1703484409893.png

    outputs('Compose-dayOfWeek')
    addDays(outputs('Compose-formatSalaryDate'), -2, 'yyyy-MM-dd')
    utcNow('yyyy-MM-dd')
    mul(outputs('Compose-DateDiffer'), -1)

    vyetonggumsft_6-1703484969568.png

    outputs('Compose-DateDiffer')
    int(-1)
    dayOfWeek(utcNow())
    outputs('Compose-dayOfWeek')

    vyetonggumsft_7-1703485083297.png

    Best Regards,

    Sunshine Gu

  • AlexandruV Profile Picture
    4 on at

    Hello 

    Thanks, it's looks ok. I will try now.
    But I didn't saw condition 1

  • AlexandruV Profile Picture
    4 on at

    Hello 
    not working , but in my opinion should be more easy 

    like today date minus salary date. I'm new in automation 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard