Office & Productivity Software forum

General discussion

Automatically taking off a lunchbreak

by klib87 / December 25, 2008 3:40 PM PST

Can you help me with creating a timesheet where staff enter the start and finish time have the next field calculate the total time and if its more than 5 hours automaically taking off 30minutes..?

e.g
Start 9:00
Finsh 16:00
Total 6.5

Discussion is locked
You are posting a reply to: Automatically taking off a lunchbreak
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Automatically taking off a lunchbreak
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: timesheet
by Kees Bakker / December 25, 2008 10:28 PM PST

The exact formula depends on your programming language. For example, it would be different in PHP and Excel. So without that detail (and a lot more) all I can give is the pseudocode:
if (difference > 5 hours) difference = difference - 0.5 hours


Kees

Collapse -
kk
by klib87 / December 26, 2008 12:53 PM PST
In reply to: Re: timesheet

Umm basically is just for a plain old excel spreadsheet.

Collapse -
Re: Excel
by Kees Bakker / December 27, 2008 12:20 AM PST
In reply to: kk

Then it's just an if-formula.

Remember that dates are integers, and hours in dates are floatings behind the decimal point. So 5 hours = 5/24 = 0.2083333333....

Might need some experimenting, but you'll manage it.

Kees

Collapse -
I've been there.
by R. Proffitt Forum moderator / December 25, 2008 10:36 PM PST

The lesson is to nod your head a lot and keep showing time sheet software. The amount of time and dollars a company would lose over creating their own timesheet software is more than what you would pay for such a thing.
Bob

Popular Forums

icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

FALL TV PREMIERES

Your favorite shows are back!

Don’t miss your dramas, sitcoms and reality shows. Find out when and where they’re airing!