karthik82.vk
11-08-2012, 04:41 AM
I have a startdate with time and enddate with time for each project. the enddate will be calculated based on the startdate + 8 hrs for each project.
My working hours starts from 09:00:00 and ends by 18:00:00 in the evening
If the enddate falls after my working time, then the off work time needs to be neglected.
say for example if my startdate is 11/08/2012 16:58:18 then my enddate will be calculated as 11/9/2012 12:58:18. ie 8 hrs will get added from the start date.
but i want the end date to be displaying only the working hours and not off work hours.
the output that i need is something like
time my work hour ends on - timevalue of my starttime = hours worked for that day + time remaining on total work hrs (8) which needs to get added on next day working hours.
18:00:00 - 16:58:18 = 1:01:42
so I have worked for 1:01:42 hrs on a project for that day in the total 8 hrs allocated for me
I have 06:58:18 left in my total working hours on that project and this left out time must be added to the nextday starting work time
09:00:00 + 06:58:18 = 15:58:18
ie my enddate must be displayed as 11/09/2012 15:58:18
I have tried a lot in doing this but i am not able to do so
can anyone help me in this.
thanks in advance...
karthik venkatraman
My working hours starts from 09:00:00 and ends by 18:00:00 in the evening
If the enddate falls after my working time, then the off work time needs to be neglected.
say for example if my startdate is 11/08/2012 16:58:18 then my enddate will be calculated as 11/9/2012 12:58:18. ie 8 hrs will get added from the start date.
but i want the end date to be displaying only the working hours and not off work hours.
the output that i need is something like
time my work hour ends on - timevalue of my starttime = hours worked for that day + time remaining on total work hrs (8) which needs to get added on next day working hours.
18:00:00 - 16:58:18 = 1:01:42
so I have worked for 1:01:42 hrs on a project for that day in the total 8 hrs allocated for me
I have 06:58:18 left in my total working hours on that project and this left out time must be added to the nextday starting work time
09:00:00 + 06:58:18 = 15:58:18
ie my enddate must be displayed as 11/09/2012 15:58:18
I have tried a lot in doing this but i am not able to do so
can anyone help me in this.
thanks in advance...
karthik venkatraman