473,471 Members | 2,613 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

calculating time

14 New Member
help me with this. TotalTime:DateDiff("n",[starttime],[endtime])im getting mins instead of hours & mins. example" instead of 1.5 hr im getting 90. i know its something very easy to fix, but cant find it in Acess for Dummies.
Dec 13 '11 #1

✓ answered by Rabbit

DateDiff returns an integer so you can't use it for fractionals. You have to go to a lower unit and then divide. Look at my post again. I told you how to get fractionals.

6 1434
Rabbit
12,516 Recognized Expert Moderator MVP
I don't know why you would expect to get hours when you're asking the function to give you minutes. Divide the result by 60 and that will give you fractional hours.
Dec 13 '11 #2
jawbone
14 New Member
ok how do i ask the function to give me hours, thats the only formula i know to get start time and end time to work.
Dec 13 '11 #3
sierra7
446 Recognized Expert Contributor
Try
TotalTime:DateDiff("h",[starttime],[endtime])
Dec 13 '11 #4
jawbone
14 New Member
i tried that sierra it just gave me a 0 for an answer
Dec 13 '11 #5
jawbone
14 New Member
examle my time start is 11:00 and end time is 15.:15 im getting the answer 6 even thought we know that it should be 6hr15ms
Dec 13 '11 #6
Rabbit
12,516 Recognized Expert Moderator MVP
DateDiff returns an integer so you can't use it for fractionals. You have to go to a lower unit and then divide. Look at my post again. I told you how to get fractionals.
Dec 13 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: T-Narg | last post by:
I would like to produce the following output based on my XML file: My Album (2005) Elapsed Time (hh:mm:ss): 00:07:00 Song 1: title1 Length (hh:mm:ss): 00:02:30 Song 2: title2 Length...
4
by: Adam Balgach | last post by:
Greets all, i am in the process of writing a simple client/server file upload program that sends data via UDP packets. I have the process of opening.sending, recieving & writing all working...
4
by: luscus | last post by:
I am trying to device a formula so that when i check of a yes/no box (done) it will automatically add the time in a field called "End Time" and at the same time stamp the amount of minutes...
3
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite condition to understand. So if you could talk down to...
3
by: DBLWizard | last post by:
Howdy, I have looked and don't see a straight forward way to calculate time differences in milliseconds. What I am wanting to do is benchmark or time how long things take. So I want to...
25
by: Blaize | last post by:
Hi, I'm having an issue trying to calculate time. Its okay if the value does not exceed 24 hours otherwise I get a date and hours listed. For example, I have a loop which looks through a table...
1
by: madmuis | last post by:
So i wan't to calculate The date and time FROM an old date and time so for example 03-22-08 02:54 pm this is the old time and date i need it to calculate +5 days +/- 30 hours. So i made a dropdown...
6
by: Adam1331 | last post by:
I am currently setting up a database for work that will operate as a timesheet. I have set up multiple tables, queries, forms and reports to help this process run smoothly. The issue that has...
3
by: mfaisalwarraich | last post by:
Hi everybody. I have some problem while calculating time. i have employees who are working on hourly basis. i want to calculate the time. for example if an employee start working at 11:00pm...
4
by: Missionary2008 | last post by:
Thank you in advance for your help. I'm trying to calculate the Total Time in hours and minutes to complete a job. The way we are calculating it is by taking the Fee paid and dividing that by a...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.