Jump to content

Midnight Calculation


This topic is 6946 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm writing a script that creates a number of 15-min periods (Timeslots) over a period of days.

I have been successful with the First Day (e.g. ((Time( 24, 00, 00) - CalItem_Start_Time)/60)/15) and the Next Day(s) but have run into a dead-end when trying to get the Timeslots for the Last Day.

I have an End Time and want to take the End Time from Midnight but cannot get my head around it.

Can anyone help?

Link to comment
Share on other sites

Lee, I think I've got it.

If I treat the End Time as a number in a calculation (Field:"End Time" Result: Number) and then divide it by 60 to get the minutes so that "11:30" - using the 24-hour clock - gives me "690" (likewise, "23:30" gives me "1410") I am now able to get my 15-minute periods from the previous midnight (Midnight = "00:00") simply by dividing 690 by 15.

Thanks to you and Vaughan for your help.

Link to comment
Share on other sites

This topic is 6946 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.