Subtracting Times... (1 Viewer)

QMDirk

Member
Local time
Today, 04:04
Joined
Nov 16, 2019
Messages
48
Hi again. Does anyone have a simple code to subtract one Time from another and display the result in Minutes? Ex: [Time Up]-[Time Down]=[Total Minutes]
 

namliam

The Mailman - AWF VIP
Local time
Today, 13:04
Joined
Aug 11, 2003
Messages
11,683
In your query , form or report where ever you need this.
 

QMDirk

Member
Local time
Today, 04:04
Joined
Nov 16, 2019
Messages
48
I see. To this day, I have never successfully used a Function in VBA to do anything. Web pages don't answer all of my questions and I'm left hanging. I understand what the function is trying to do, I just have no idea where to put it.
 

missinglinq

AWF VIP
Local time
Today, 07:04
Joined
Jun 20, 2003
Messages
6,393
Yes, but where, please? The last explaination wasn't clear about where to insert the DateDiff() code...
And your original post said nothing about where you need it to go! As the Mailman said, it needs to go wherever you need it to go.

Perhaps a plain language explanation of exactly what you're trying to do would help us to help you.

Linq ;0)>
 

bob fitz

AWF VIP
Local time
Today, 12:04
Joined
May 23, 2011
Messages
4,128
I see. To this day, I have never successfully used a Function in VBA to do anything. Web pages don't answer all of my questions and I'm left hanging. I understand what the function is trying to do, I just have no idea where to put it.
Use in a query as a calculated field. Something like:
Answer: DLookup()etc

Or as the Control source property of a textbox on a form. Something like:
=DLookup()etc
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:04
Joined
Jul 9, 2003
Messages
12,121
Web pages don't answer all of my questions and I'm left hanging.

I know exactly what you mean, it's a long time since I started learning MS Access, and I do remember it being quite difficult. However, as I've got more proficient, I find it easy, and then when I see someone ask a question I immediately know the answer, and sometimes I wonder why people don't know. Now, that was until recently, until I started learning a new programming language from scratch myself! It's an absolute nightmare, the simplest things are beyond me, and to get the information, to find the answer is so convoluted and laborious. I feel for you! I hope you find my Nifty Access website useful. I try and address things in a simpler manner than most, to cater for people who are trying their best to learn!

Add Time to a Date - Nifty Access


I've put together a few videos over the years on the date/time issues in Microsoft Access. If you would like a bit more background information on the date/time issues see my website here:-

 
Last edited:

Users who are viewing this thread

Top Bottom