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 Apps / How to get the first d...
Power Apps
Answered

How to get the first day of the month?

(0) ShareShare
ReportReport
Posted on by 496

Hello everyone,

 

I hope all is well,

 

What I'm trying to do:

I was trying to get the first day of the month in order to compare it with a date/time column in a database table. I am using it in a filter.

 

What I did:

Roberto_el_Hajj_0-1664633688984.png

 

I retrieved the first day of the month but it's an invalid date I don't know why.

 

My filter expression as you can see in the picture below is not working because of the date logical test

Roberto_el_Hajj_1-1664633881366.png

 

I think the problem is that my expression only returns the date without the time.

 

What I need:

What is the solution to my filter problem?

 

 

Any help would be greatly appreciated,

 

Thanks in advance 😃.

 

 

Categories:
  • Verified answer
    timl Profile Picture
    37,422 Super User 2026 Season 2 on at

    @Roberto_el_Hajj 

    The following returns the first day of the month (you don't need to call DateAdd). If you use this instead, it might take you further.

    Date(Year(Today()), Month(Today()),1)
  • RobHajj98 Profile Picture
    496 on at

    Thanks, @timl for your help, I really appreciate it

  • ErwanF Profile Picture
    94 on at

    Short and concise answer @timl. This helps me. Thanks!
    For context, I need certain button to be activated on that particular date.  Put this code in DisplayMode.

    If(
     Text(
     Date(
     Year(Today()),
     Month(Today()),
     1
     ),
     "dd.mm.yyyy"
     ) = Text(
     Today(),
     "dd.mm.yyyy"
     ),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

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 Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard