الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculate The Number Of Minutes Between Two Date-time Values And Skipping Weekends

Featured Replies

بتاريخ:

I need to write function that calculate The Number Of Minutes Between Two Date-Time Values and Skipping Weekends
Also 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 PM


create 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 14
create 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;

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.