473,442 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How Hard Can This Be? - Time Difference

I have two text boxes.

In one, I am entering a start time. In this case, it is a 24 hour
time, which is "16:00"

In the other, I am entering an end time. In this case, which will be
"00:00", which is twelve midnight.

The question is, how do i find the difference of these two times in
the "hh:mm" format.

Every solution i've tried(and i've been searching and searching for 1
and 1/2 hours) gives me either -16 hours, or a data type error.

I am ripping my hair out. I have a deadline of two days and I cannot
get past this.

Please help quickly.

Aug 25 '07 #1
2 1647
On Aug 25, 2:05 pm, saphite <joevi...@yahoo.comwrote:
I have two text boxes.

In one, I am entering a start time. In this case, it is a 24 hour
time, which is "16:00"

In the other, I am entering an end time. In this case, which will be
"00:00", which is twelve midnight.

The question is, how do i find the difference of these two times in
the "hh:mm" format.

Every solution i've tried(and i've been searching and searching for 1
and 1/2 hours) gives me either -16 hours, or a data type error.

I am ripping my hair out. I have a deadline of two days and I cannot
get past this.

Please help quickly.
But 16 is correct (datediff("h", "00:00", "16:00") = 16). The
difference between midnight and 4pm is 16 hours.

Vincent

Aug 25 '07 #2
"Well, since the date is not integral to my calculation, I would say
it's a little "workaroundish"."

In point of fact, the date *is* integral to your calculations, which is why
you're having so much trouble, because you're trying to ignore this fact!
*Time* simply does not exist independent of date! 16:00 today *is not* the
same as 16:00 tomorrow!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

Aug 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: José | last post by:
I'm programming a simple script to calculate response time from one server to another server. I put the time in secons in a variable. I take the web, and I take the time again, the difference is...
7
by: Colin Brown | last post by:
Python 2.3.3 Under Windows NT: Negative Int or Real -> sleeps for a long time Under Linux: Returns IOError: Invalid argument I consider both of these unfriendly results and expected the...
3
by: George Hester | last post by:
You know there is a difference between the Microsoft .NET Framework and the Microsoft .NET Framework SDK. Besides the fact that the former is 20 some MB and the latter is some 100MB there is a...
29
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them...
2
by: Jeff | last post by:
Hi A client is installing a new 15000 SCSI hard drive, in addition to a 7200 IDE, on their server, running Terminal Server 2000, and has asked this question. Does it make a difference where...
33
by: Xah Lee | last post by:
The Harm of hard-wrapping Lines 20050222 Computing Folks of the industry: please spread the debunking of the truncating line business of the fucking unix-loving fuckheads, as outlines here:...
3
by: Steve | last post by:
I am trying to calculate elapsed travel times for flights. My plan is to enter the local departure time, the departure city and the local arrival time and city. These times would be standardised...
3
by: Kurt Mueller | last post by:
David, Am 07.10.2008 um 01:25 schrieb Blubaugh, David A.: As others mentioned before, python is not the right tool for "HARD REAL TIME". But: Maybe you can isolate the part of your...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.