Jaman Posted April 30, 2006 Share Posted April 30, 2006 Need some newbie help here.. How do I calculate two time fields? I have a "start time" and a "stop time". What I want is to calculate this, so I can get the total hours in a third field named "total time". And, if these hours are passing midnight? Confused :) Link to comment Share on other sites More sharing options...
jteich Posted April 30, 2006 Share Posted April 30, 2006 Use timestamps instead. -jens Link to comment Share on other sites More sharing options...
Jaman Posted April 30, 2006 Author Share Posted April 30, 2006 If I understand timestamps correct, I have to auto enter a timestamp in "start" and "stop", using a script or something. Then calculate the two timestamp values? Does it work even if the time is passing midnight? How do I show the result in hours? Don't need the date and everything... Thx. Link to comment Share on other sites More sharing options...
Teresa Sampaio Posted April 30, 2006 Share Posted April 30, 2006 Hi, Jaman, I had a similar problem. See my post #197367 Link to comment Share on other sites More sharing options...
jteich Posted April 30, 2006 Share Posted April 30, 2006 set the timestamps simply by Timestamp ( Get( CurrentDate ) ; Get( CurrentTime ) ) and subtract start_timestamp from stop_timestamp. The result is in seconds. -jens Link to comment Share on other sites More sharing options...
LaRetta Posted April 30, 2006 Share Posted April 30, 2006 To answer a question you've asked twice: "Does it work even if the time is passing midnight?" Timestamps are beautiful. Because they include the date, they will perform math properly past midnight, adjust for months, years and leap-years. To show the result in hours, format the result as Time field. :wink2: Link to comment Share on other sites More sharing options...
Jaman Posted May 8, 2006 Author Share Posted May 8, 2006 Got it... Thanks : Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6563 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