Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Hide time for All Day events on Calendar web part

  Asked By: Eleanor    Date: Dec 21    Category: Sharepoint    Views: 25383

Currently, when I add my Calendar web part to my page it displays the
date and time for start and end dates. How can I get my web part to
hide the times and only show the start and end date when the All Day
event box is checked?



1 Answer Found

Answer #1    Answered By: Heather Thurber     Answered On: Jul 16

Although this was asked long ago, there have been enough views that I am going to answer.

In your list, create a calcluated column called "AllDay" and use the following formula:
=IF((TEXT([End Time]-[Start Time],"h"))="23","Yes","No")
*You cannot query [All Day Event] so you need to create a query column.

Create a second calculated column named "Event" and use the following formula: =IF(AllDay="YES",TEXT([End Time],"MM/DD/YYYY"),TEXT([Start Time],"MM/DD/YYYY H:MM AM/PM"))

Customize your view to include the "Event" column instead of [Start Time]/[[End Time].

Didn't find what you were looking for? Find more on Hide time for All Day events on Calendar web part Or get search suggestion and latest updates.