الانتقال إلى المحتوى
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 Contracte Date From Sysdate Using Hire Date

Featured Replies

بتاريخ:

i would like to calculate when is the renewal date for each employee before two months of the renewal time exactly and i only have hiredate, i don't have last date of contract renewal in my table and i should have a form that get populated with the contracts that should be renewed before two months from sysdate .. i want an accurate way to do it .. i used this one but i am not sure if it is 100% accurate



is there a better way to do it .... main missing data is last renewal date( here is my problem) and i am not supposed to add it


select id, FIRST_NAME_ARB, employment_date, MOD(months_between ( trunc(sysdate) ,trunc(employment_date))/12,1) from PRS_EMPLOYEE_PROFILE
where
MOD(months_between ( trunc(sysdate) ,trunc(employment_date))/12,1) > .8

what do you think is?

بتاريخ:

to have the employees of exactly 2 months you have to type

Where MOD(months_between ( trunc(sysdate) ,trunc(employment_date))/12,1) = 0.83333333333

بتاريخ:

السلام عليكم ورحمة الله


I haven't realize What you need exactly but your syntx have some mistakes :)
1.the Trunc want other argument in its paranthesis weth comma separater
2.the function MOD takes months_between(trunc(sysdate) ,trunc(employment_date))/12)
as first argument and(1)as secound argument so you should write it sa folllow:
months_between (sysdate ,employment_date),12.1)
at last the I think the next conditions will help you :)
1].WHERE EMPLOYMENT_DATE=ADD_MONTHS(SYSDATE,-2) --if ypu want it exactly (as you wrote)
--By a day
---
2].WHERE TRUNC (SYSDATE-EMPLOYEMENT_DATE)=2
--
3].WHERE TROUNC(MONTHS_BETWEEN(SYSDATE,EMPLOYMENT_DATE))=2
---
With best wishs
Abo_Obaida

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

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

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

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

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

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.