R RevJeff Registered User. Local time Today, 09:07 Joined Sep 18, 2002 Messages 129 Jun 5, 2003 #1 How can I take one time field and subtrack it from another and come up with the time difference? Ex: 03:00 pm - 02:00 pm ="1 hour" or "01:00" Both are medium time fields. Is this possible? Thanks, Jeff
How can I take one time field and subtrack it from another and come up with the time difference? Ex: 03:00 pm - 02:00 pm ="1 hour" or "01:00" Both are medium time fields. Is this possible? Thanks, Jeff
R. Hicks AWF VIP Local time Today, 08:07 Joined Dec 23, 1999 Messages 619 Jun 5, 2003 #2 If you are only entering the Time values .. you will have a problem when the end tim spans into another day. But if the elapsed time will never span more than 24 hours .. go to the link befow for information and a work around. StartTime-EndTime Results in a Negative Number HTH RDH
If you are only entering the Time values .. you will have a problem when the end tim spans into another day. But if the elapsed time will never span more than 24 hours .. go to the link befow for information and a work around. StartTime-EndTime Results in a Negative Number HTH RDH
fuzzygeek Energy Ebbing Local time Today, 14:07 Joined Mar 28, 2003 Messages 989 Jun 5, 2003 #3 Time This works but if you require more than 24 hours as shown in the previous suggestion, you must put the date(s) in this. Also following the example is the link to MS Knowledge Base which can also help you in setting this up. StartDate = #6/1/1993 3:30:00 AM# EndDate = #6/2/1993 1:25:00 AM# 'StartDate = #3:30:00 AM# 'EndDate = #1:25:00 PM# Debug.Print Format(EndDate - StartDate, "hh:mm") http://support.microsoft.com/default.aspx?scid=kb;EN-US;210604
Time This works but if you require more than 24 hours as shown in the previous suggestion, you must put the date(s) in this. Also following the example is the link to MS Knowledge Base which can also help you in setting this up. StartDate = #6/1/1993 3:30:00 AM# EndDate = #6/2/1993 1:25:00 AM# 'StartDate = #3:30:00 AM# 'EndDate = #1:25:00 PM# Debug.Print Format(EndDate - StartDate, "hh:mm") http://support.microsoft.com/default.aspx?scid=kb;EN-US;210604