Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Display AM/PM along with Date on Calendar




I have a Calendar as follows :



As you can see, If a user applies for leave for a SINGLE DAY from Calendar for FULL DAY, It shows Full Day in Brackets

For half day, It will display Session 1 (AM). 



Now, If I want to apply in RANGE ( Aug 30-Aug 31 -- FULL DAY), It will show as :



Problem: If I apply in RANGE but I want to apply HAlf day for Aug 31... i.e., 1.5 Days
then it will display Session 1 (AM ) for both Aug 30 and Aug 31.




Fields: This is how I'm applying for a Leave

From Date -- From Session (Session 1/Session 2) 

To Date -- To Session (Session 1/Session 2) 



Session 1 = AM 

Session 2 = PM





My Code :

If(ThisItem.FromSession="Session 1" && ThisItem.ToSession="Session 2" ,"Full Day",
   ThisItem.FromSession="Session 1" && ThisItem.ToSession="Session 1" ,"Session 1",
   ThisItem.FromSession="Session 2" && ThisItem.ToSession="Session 2","Session 2")



Required Output :


Aug 30 (Full Day) and Aug 31 (Session 1)



I hope my problem is understood. 

Super User
Super User

But in your formula nowhere it is calculating based on the dates. It is only seeing the session dropdowns.


Therefore this formula (or any other) is always evaluating to Session 1 irrespective of what the dates are selected.

ThisItem.FromSession="Session 1" && ThisItem.ToSession="Session 1" ,"Session 1",


So need to work out on a logic to include dates too.


Yeah, I'm not able to figure that logic.

Can you help me in including dates along with sessions? 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (1,719)