Calculating the SharePoint End Date / Time for a Custom List with a Calendar View

Let’s say you’d like to create a custom list that had a calendar view associated with it.  And in that list, you wanted to emulate what the SharePoint calendar list does (which is to pre-calculate the End Date / End Time for you).  How does one do such a thing?

Basically, I’m referring to how to calculate the below field. 

image

Note that to get the Start Date / Start Time, SharePoint will actually do this for you, by selecting “Today’s Date”.

SNAGHTML175219b

End date (or end time) is the more complicated one.  Here’s the SP formula for calculating it.

=Today+(ROUNDUP(NOW.TIME()*24,0)/24)+(1/24)

Basically, this equates to:

Today (if you don’t include this, your date starts back in 1899), plus the time right now rounded up to the next hour (the middle funkiness), plus an extra hour (1/24).

SNAGHTML1786722

Now you no longer need the SP Calendar list to do this for you, especially if you don’t want all the integration points that come with the SP Calendar list.