cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Matching date in Excel table with dates on Calendar Gallery

I'm building an app to track data to and Excel table.

 

Using a calendar gallery, I would like to circle each date that has an entry in the table.  Like this example from David Nissimoff's Building an interactive calendar view with PowerAppscal-image1

 

I added a Collect to the App -> OnStart to create a single column of the dates in the table.

 

Collect(_variable,Table1.Date);

 

On the CalendarScreen, under the MonthDayGallery I have added a circle and set the Visible property to:

 

DateAdd(_firstDayInView,ThisItem.Value,Days) in _variable

 

and the Fill property to

 

ColorFade(RGBA(118,0,0,1),If(Month(DateAdd(_firstDayInView,ThisItem.Value,Days))=Month(_firstDayOfMonth),0,80%))

 

Given the app has shows no errors.  I suspect my problems lies it that frickin' time that get appended to the date.

 

I feeling like I'm I'm really close (following David Nissimoff's Building an interactive calendar view with PowerApps) 

 

An ideas?  thanks

 

2 REPLIES 2
Community Support
Community Support

Hi @akmiecik1 ,

Based on your mainly problem, I suggest you thransfer your date time value to date value, then you could avoid this problem.

The firstly step: I added a Collect to the App -> OnStart to create a single column of the dates in the table.

You could make a little change. Try this formula:

Collect(_variable,ForAll(Table1,DateValue(Text(Date,DateTimeFormat.ShortDate))))
//in this way, the Date field will transfer its data to date value, but field name will change to Value

So after that change, please note that change field name to Value.

For example, your step2, you need to change like this:

IsBlank(Filter(_variable,Value = DateAdd(_firstDayInView,ThisItem.Value,Days)),true,false)

Here's a doc about text transferring for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

 

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

IsBlank(Filter(_variable,Value = DateAdd(_firstDayInView,ThisItem.Value,Days)),true,false)

Is producing error.  "Invalid number of arguments:  received 3, expected 1"

 

Changin Collect(_variable,Table1.Date) to

 

Collect(_variable,ForAll(Table1,DateValue(Text(Date,DateTimeFormat.ShortDate))))

 

Produces good results.  I created a new gallery and linked to _variable and the dates show mm/dd/yyyy (i.e. no time)

sss

 

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (75,669)