cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Roberto_el_Hajj
Super User
Super User

How to get the first day of the month?

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 😃.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@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)

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@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)
Roberto_el_Hajj
Super User
Super User

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,648)