vba - shift out time taking as next date in time in excel -
i admin of bio-metric device, there 3 shifts going in office.
in time out time date shift1 6am 2pm 5th april shift2 2pm 10pm 5th april shift3 10pm 5th april 6am 6th april
but 3rd shift time intime 10pm taking as
in time out time day1 out time 10pm day2 in time 6am
how can make same date 10pm intime , 6am out time in excel?
and want generate automatically. want out time must shown same date.
date intime outtime 5.4.17 6am 2pm 5.4.17 2pm 10pm 5.4.17 10pm 6am
and want automate report while generating web.
=now() generate number (double type) 42832.8008217593 date shown on left of period , time on right. 10 pm (22:00:00) expressed 0.9166666667. add 8 hours number (1/24*8) , result 1.25 means, in plain language, "next day 6 am".
to solve problem can use condition, like, if end time on next day, deduct 1 day result date. mean 1.25 - 1 = 0.25 = 6:00am on day 1 day earlier is. whether end time proper date/time, 42833.25 or relative time 1.25 depends upon how enter data.
you can extract time date/time value calculating (date/time - int(date/time), 1.25 - int(1.25) = 1.25 -1 = 0.25
Comments
Post a Comment