تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2457 أدوات العرض

For example i have record like this in Model A 

Model A
User Name        User In Time
User A                    9:05
User A                    9:08

User A                    9:10 

User A                    9:12

User A                    9:15
User A                    9:25


i need record with 15 mint margin 
Model B
User Name        User In Time
User A                    9:05
User A                    9:25
i need to create this entry into model B

الصورة الرمزية
إهمال
أفضل إجابة

In function create on model A, you will check max time of user and compare with new time value.

  1. You get max time in model B by user and convert it to float ( ex: 9:30 = 9.5 ).

 2. Compare max time and new time.

   - If "new time" - ( 15/60.0 ) > max time"  ( 15 min). you will create new record into model B ( or update max record if you need ).

  - Else you update max time  in model B. 

I hope my comment will help you for this issue.






الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
5891
3
يوليو 25
902
0
نوفمبر 24
1217
2
يوليو 22
5491
1
أبريل 15
4594