24小时格式的出勤管理 [英] Attendance Management in 24 hrs format

查看:71
本文介绍了24小时格式的出勤管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我正在开发一个三班倒处理出勤管理的软件。我被困在从晚上11点开始处理夜班的区域在我的软件中,我们允许在持续时间内刷卡,例如提前入住和延迟入住,有时候在第二天延迟入住,在这种情况下我不能跟踪是否是一个滑动,因为第二天结束的转移,这就是为什么我的代码将刷卡视为滑出。



例如:提前入住时间是实际时间前60分钟(即晚上10点),延迟入住时间是实际时间(01:00 AM)后120分钟



我的实际刷卡时间是晚上11点



有没有人有这个回复的解决方案



希望对此查询有好的回复



问候

Anilraj

Dear Friends,

I am developing a software which handling attendance management in three shifts. I am stuck in the area where which handling night shift starting from 11pm In my software we are allowing a swipe in time duration like early check in and late check in some times late check in lies on the next day in this case I am not able to track whether it is a swipe in because the shift ending on the next day thats why my code treat that swipe in as swipe out.

for example: Early check in is 60 min before actual time ( ie 10 PM) and late check in is 120 min after actual time (01:00 AM)

my actual swipe in time is 11PM

Is there any one have the solution for this pls reply

Hope a good response for this query

Regards
Anilraj

推荐答案

只需使用日期和时间而不仅仅是时间。



所以2013年6月3日23:00将永远是例如,不到2013年6月4日00:30。



如果由于某种原因你没有时钟的时钟可用,那么你将不得不决定如何猜测日期应该是什么。例如,如果预计的入住时间是3月23日,并且您有时间刷过09:00,您可以假设这是第4次退房
Simply always use Date&Time rather than just Time.

So 3rd June 2013 23:00 will always be less than 4th June 2013 00:30 for example.

If for some reason you don''t have the date available from the clocking in clock then you will have to make a decision as to how to ''guestimate'' what the date should be. for example if the check in time expected is 23:00 on 3rd and you have a time swiped of 09:00 you could assume this is a check out for the 4th


您有现在的日期&时间,



所以当你过滤或验证日期时间



你可以添加一天到日期时间然后自动你可以得到结果。



ex:



punchdate:03/17/2013 punchtime :10:10pm

nextday punchlogout:03/18/2013 punchtime:1:00AM



验证:



将日期添加到日期时间:



1.您有ShiftBeginDate,ShiftBegintime和ShiftEndtime。



2.要求日期是次日?



解决方案:DateTime ShiftEndTime = ShiftBeginDate.AddDays(1);



3.然后最终条件



var result =来自objpunches中的行

其中( row.ShiftBeginDate& gt; ShiftBegintime)&&(row.ShiftBeginDate< shiftendtime))>

选择行).ToList();



你可以esily得到结果。
you have present date & Time,

So when ever you filter or validate datetime

you can add one day to datetime then automatically you can get the result.

ex:

punchdate:03/17/2013 punchtime:10:10pm
nextday punchlogout:03/18/2013 punchtime:1:00AM

you validation:

add the one day to datetime:

1. you have ShiftBeginDate,ShiftBegintime and ShiftEndtime.

2. required date that is nextday date?

Solution: DateTime ShiftEndTime=ShiftBeginDate.AddDays(1);

3. then finally condition

var result=from row in objpunches
where(row.ShiftBeginDate>ShiftBegintime) && (row.ShiftBeginDate<shiftendtime))>
select row).ToList();

you can esily get the results.


这篇关于24小时格式的出勤管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆