Oracle of dating

select to_char(to_date(’15-aug-1947’,’dd-mon-yyyy’),’Day’) from dual; TO_CHAR(--------Friday To see how many days have passed since 15-aug-1947 then give the following query select sysdate-to_date(’15-aug-1947’,’dd-mon-yyyy’) from dual; Now we want to see which date will occur after 45 days from now select sysdate 45 from dual; SYSDATE-------06-JUN-2003 To see which date will occur after 6 months from now, we can use ADD_MONTHS function Select ADD_MONTHS(SYSDATE,6) from dual; ADD_MONTHS----------22-OCT-2003 To see how many months have passed since a particular date, use the MONTHS_BETWEEN function.

When you extract a TIMEZONE_REGION or TIMEZONE_ABBR (abbreviation), the value returned is a string containing the appropriate time zone name or abbreviation The syntax of EXTRACT function is EXTRACT ( YEAR / MONTH / WEEK / DAY / HOUR / MINUTE / TIMEZONE FROM DATE) Example The following demonstrate the usage of EXTRACT function to extract year from current date.An Oracle DATE stores the date and time to the second.An Oracle TIMESTAMP stores the date and time to up to 9 digits of subsecond precision, depending on the available hardware. For example: add_months(SYSDATE,3) returns 3 months after sysdate.This could be rounded to below is the resulting month has fewer days than the month this function is applied to.

oracle of dating-82oracle of dating-8oracle of dating-8

To see the system date and time use the following functions : CURRENT_DATE :returns the current date in the session time zone, in a value in the Gregorian calendar of datatype DATESYSDATE : Returns the current date and time.

Join our conversation (71 Comments).
Click Here To Leave Your Comment Oracle of dating.


Leave a Reply

Your email address will not be published. Required fields are marked *