Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2008, 10:34 PM
Registered User
 
Join Date: Apr 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calculating time

Hello,
I got stuck with calculation/rounding and converting numbers back to time
Maybe I was taking too complicated way to do so ...

I am trying to do some small helper to count the time for each employee / timecards calculator

I have a following table (for each employee one)
F1 = IN/OUT F2 = date F3 = time
IN 1/4/2008 8:53
OUT 1/4/2008 17:21
IN 2/4/2008 8:42
OUT 2/4/2008 16:44

I need to round the time first. There are different rules to round the time for IN and different for OUT.

IN - ROUND function - i do not have any problems with that
OUT - FLOOR function from MS excel, factor = 15 minutes

FLOOR - I did query, I separated hours from minutes using DatePart function and I did a module to define FLOOR as Floor = Int(X / Factor) * Factor
and I rounded the separated minutes using FLOOR

In my case I got:
   worked
hours minutes FLOOR
17 21 15
16 44 30

Now I need to get them back to hour format and I am having trouble to do so. I would like to see 17:15 or 16:30 in my case
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating a time difference SQLScott SQL Server 2005 11 October 25th, 2007 02:42 AM
calculating time differences vincee SQL Server 2000 6 January 24th, 2006 11:02 AM
Calculating Time elapsed on form load Brendan Bartley Access 0 June 21st, 2005 09:02 AM
Problems with" i=i+1" and calculating time tronnen XSLT 4 June 6th, 2005 04:17 PM
Missing time part while calculating the Delay happygv SQL Language 2 October 29th, 2003 11:57 PM



All times are GMT -4. The time now is 10:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.