Carl Smith Posted July 12, 2005 Posted July 12, 2005 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?
Vaughan Posted July 13, 2005 Posted July 13, 2005 FMP stores time as the number of seconds from midnight.
Carl Smith Posted July 14, 2005 Author Posted July 14, 2005 Thanks for your response, Lee but the zeros don't reduce my End Time data (e.g. End Time = "11:30" less "00:00" still gives me "11:30")
Carl Smith Posted July 14, 2005 Author Posted July 14, 2005 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.
Recommended Posts
This topic is 7140 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 accountSign in
Already have an account? Sign in here.
Sign In Now