Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > DateDiff < Sorted Combo Box | Double Double >
Back to DateDiff    Comments List
Hours and Minutes Upload Images   Link   Email  
Mark Desens       
10 months ago
Hey guys I am having a little trouble with this IIF datediff VBA code. On my form we have 2 fields that we put the start time and end time, it shows the amount of time it took to complete a call. Below those two is a total minutes field that shows the total time of that call and it's only in minutes. here is the code. How do I change it to show the hour and munites? thanks.

=IIf(DateDiff("n",[StartTime],[EndTime])=0,1,DateDiff("n",[StartTime],[EndTime]))
Kevin Robertson            
10 months ago
The screenshots below show how to do this.

The first image show it done in a Query.
The second image shows how to do the same thing in VBA.

Modify for your own needs.
Kevin Robertson            
10 months ago

Kevin Robertson            
10 months ago

Richard Rost             
10 months ago
Love the IIF statement for "hour" vs "hours". Me, I go cheap with it: 5h 10m. LOL
Mark Desens       
10 months ago
any videos on how to convert just minutes to hours and minutes.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in DateDiff.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/24/2024 8:22:01 AM. PLT: 1s