Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Calendar

Posted on by
I am entering this formula:
 
Set( monthStart; Date( Year(Today()); Month(Today()); 1))
 
But for any reason it gives me error
 
Categories:
  • Suggested answer
    timl Profile Picture
    timl 31,946 on at
    Calendar
    Yes, as I mentioned in my earlier post, double semi colons are needed between the lines (except for the last line)
     
    // Get the start of the month
    Set(monthStart; Date(Year(Today()); Month(Today()); 1));;
    
    // Get the end of the month
    Set(monthEnd; DateAdd(DateAdd(monthStart; 1; "Months"); -1; "Days"));;
    
    // Get first date in view 
    Set(firstDateInView; DateAdd(monthStart; -Weekday(monthStart); "Days"))
     
  • Suggested answer
    KBpwr Profile Picture
    KBpwr 55 on at
    Calendar
    Update: Sounds like there is indeed a operators difference pointed out by another user so that should fix this.
     
     
  • Suggested answer
    timl Profile Picture
    timl 31,946 on at
    Calendar
    Hi CU04112231-0
     
    There should be 2 semi-colons (;;) between the formulas.

    It would look something like this:
     
    Set( monthStart; Date( Year(Today()); Month(Today()); 1));;
    Set( monthEnd; DateAdd(DateAdd(monthStart; 1; Months); -1;Days));;
    Set(firstDateInView.......
    
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard