alsalami بتاريخ: 29 مايو 2007 تقديم بلاغ مشاركة بتاريخ: 29 مايو 2007 I need to write function that calculate The Number Of Minutes Between Two Date-Time Values and Skipping WeekendsAlso skip the time between 03:01:00 pm to 06:59:00 Am I need to enter the two date with time the return value should be the number of Minutes between to days without weekend days and the time between 7:00 AM to 3:00 PMcreate or replace function workingday (d1 date, d2 date) return number this function must subtract the weekend day (friday and Saturday)for example'select workingday('1-may-07',20-may-07’)the result must be 14create or replace function workingday (d1 date , d2 date) return number is total number;startdate date ;DayNum POSITIVE; begin total := 0; startdate := d1; while (startdate <= d2) loop startdate := startdate +1; DayNum := TO_CHAR(startdate, 'D'); IF DayNum BETWEEN 2 AND 6 THEN total :=total+1; end if; end loop; return total; end workingday; اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.