
Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
> [top-posting corrected]
>
[quoted text clipped - 16 lines]
> Er, so how can you possibly know when the job ends if you don't know
> when it starts...?
Another possible problem is how many hours will the person work each
day. A job which takes 10 hours where the person works one hour a day
will have a much different end date than one where the person works a
7.5 hour work day.
To me the three details that would be necessary are start date, end date
and hours to complete the job.
Just my two cents.
LS
Its not a job such as a sql job, or anything like that, its a repair job on
a car so time isn't a factor only the number of days.
so if the user body guy enters in a start date of 7/11/2008 and enters in
the number of hours its going to take to do each task, prep, paint, etc.
such as a total of 8 hours, then they should see an end date of 7/12/2008
and so on.
> [top-posting corrected]
>
[quoted text clipped - 16 lines]
> Er, so how can you possibly know when the job ends if you don't know when
> it starts...?
Lloyd Sheen - 21 Jul 2008 18:25 GMT
> Its not a job such as a sql job, or anything like that, its a repair job on
> a car so time isn't a factor only the number of days.
[quoted text clipped - 20 lines]
>> Er, so how can you possibly know when the job ends if you don't know when
>> it starts...?
Is this for a real application? Your example seems to go against what
you are saying. A job that takes lets say 10 hours, if there is prep
painting etc., the drying of the paint must occur prior to other steps
so the number of hours is not indicative of the time to do the job. And
what happens when an 'emergency' job comes in and the person/people
required to do the job are busy with other work.
Most jobs like this are charged by worktime not by the time the job will
be finished.
LS
bruce barker - 21 Jul 2008 18:27 GMT
so you take the number of hours, divide by max hours a day, to get number of
days. then add to start date. you may need to take into account non-working
days (sunday, holidays, etc).
-- bruce (sqlwork.com)
> Its not a job such as a sql job, or anything like that, its a repair job on
> a car so time isn't a factor only the number of days.
[quoted text clipped - 24 lines]
> > Er, so how can you possibly know when the job ends if you don't know when
> > it starts...?
Mark Rae [MVP] - 21 Jul 2008 18:30 GMT
[top-posting corrected again]
>>>>> I have an application that allows the user to pick a start date, then
>>>>> the enter in a number of hours to do a job, then a stop date fills out
[quoted text clipped - 19 lines]
> such as a total of 8 hours, then they should see an end date of 7/12/2008
> and so on.
That makes no sense...
A day isn't 8 hours long. If I start work at 8am on 11th and work for 8
hours, that doesn't make it 12th...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Scott - 21 Jul 2008 18:44 GMT
Trust me guys, I have a boat load of questions to the business folks that
own the orginal application. This app is done in Excel and they wanted it
web enabled to use in more of their body shops.
Currently if the app says it takes 16 hours to complete a job, the app shows
4 days of work time on it, 4 days an hour, so for example in the current app
if the repair guy enters in a date of
7/22/2008
16 hours of total work time
the app shows 4 days
and an estimated done date is 7/25/08
unless there is a weekend involved then it calculates them and would move
over to the following week.
So if the start date was 7/24/2008 then the app would show
16 hours of work time
4 days to complete
est done date would be 7/30/2008
and then show 4 weekdays and 2 weekend days
> [top-posting corrected again]
>
[quoted text clipped - 26 lines]
> A day isn't 8 hours long. If I start work at 8am on 11th and work for 8
> hours, that doesn't make it 12th...
akki - 22 Jul 2008 08:55 GMT
I think u have solution ready made with you.
requirement 1: No of hours which make one working day = 4hrs
requirement 2: Should not include weekends.
so you can get number of work day = total works hours/1 working day
(in hrs)
end day = start day + number of work days
that is it you are done.
For finding weekend you can use DayOfWeek enum