chadski021 Posted July 7, 2015 Posted July 7, 2015 Please help, I have 4 field date and time from and date and time to This the sample format 4pm 07/07/05 and 8pm 07/08/15
comment Posted July 7, 2015 Posted July 7, 2015 Assuming you want to calculate the elapsed time, make the calculation = Timestamp ( DateTo ; TimeTo ) - Timestamp ( DateFrom ; TimeFrom ) and set the result type to Time.
chadski021 Posted July 8, 2015 Author Posted July 8, 2015 Thanks it works. This is exactly what i need.
chadski021 Posted February 17, 2016 Author Posted February 17, 2016 (edited) I have a previous post here about this but i deleted it because of confusion. The calculation @comment provide me is working but i have a problem, I am not sure if its on relationship or calculation field of the date and time. I attach the example data. In task layout record 2 as you see the hours to complete is 24 so when i start at 6:AM of feb 16 it suppose to end at 6:AM feb 17. In View layout it should show but it is not appearing when i select the date of Feb 16. I also notice when i add record that exceeds at 12:AM it is not showing. Task Scheduling.fmp12 Edited February 17, 2016 by chadski021 change table to layout
Wim Decorte Posted February 17, 2016 Posted February 17, 2016 I'm not seeing the issue. What version of FM are you using?
chadski021 Posted February 17, 2016 Author Posted February 17, 2016 (edited) two versions 13 and 14. Here is the screenshot Edited February 17, 2016 by chadski021
Wim Decorte Posted February 17, 2016 Posted February 17, 2016 Ok, let's make sure you have the lingo right. When you mentioned "view table" I assumed you meant "table view". So be clear to let us know what layout you are seeing or not seeing something.
chadski021 Posted February 17, 2016 Author Posted February 17, 2016 Ow sorry not table i mean layout.
chadski021 Posted February 18, 2016 Author Posted February 18, 2016 (edited) Just to follow on this. Edited February 18, 2016 by chadski021
Wim Decorte Posted February 18, 2016 Posted February 18, 2016 it's because your time end (even though on a different date) is not greater than 6am, so the relationship from the 7am and later timeslots is not valid. You'd be better off using a timestamp field for the relationship instead of separate date and time fields. The end-time field does not know it belongs to the next day...
chadski021 Posted February 18, 2016 Author Posted February 18, 2016 What will happen is that i will create start timestamp and end timestamp is that correct?
chadski021 Posted February 18, 2016 Author Posted February 18, 2016 How about the relationship on the Date global fields?
Wim Decorte Posted February 18, 2016 Posted February 18, 2016 you wouldn't need a relationship on the date or time fields, just one on a new timestamp field in the Time table (that is a combination of the global date and the time field) and you'll need new timestamps field in Tasks, one for start and one for end and base the relationship on these.
chadski021 Posted February 19, 2016 Author Posted February 19, 2016 (edited) Thank you it seems to be working fine. By the way how do i calculate the endtimestamp? Right now i am using 3 fields Hours to Complete, Start Timestamp and End Timestamp. I know @comment provided me a calculation for this but i deleted the thread. Edited February 19, 2016 by chadski021
Wim Decorte Posted February 19, 2016 Posted February 19, 2016 Don't delete threads, even if they are confusing. There's always something to be learned from it. You calculate the ending timestamp just like you do for the starting timestamp: Timestamp ( taskDateEnd ; taskTimeEnd )
chadski021 Posted February 24, 2016 Author Posted February 24, 2016 Another thing, Using the calculation is there a way to skip the weekends?
Lee Smith Posted February 24, 2016 Posted February 24, 2016 Why not do a search for Weekend Calculations. Here, I’ll give some hints. Brian Dunning's Custom Functions site Here I already use a search word of Weekend for you. Do a Google search using these words site:fmforums.com Weekend Calculations Let me know if you don’t find what you want.
chadski021 Posted April 5, 2016 Author Posted April 5, 2016 @Lee Smith thanks finally solve my issue.
Recommended Posts
This topic is 3223 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