Search This Blog

Follow by Email

Friday, July 24, 2020

Convert Date to Number and Number to Date in Oracle



How we can convert date to number in oracle

select to_number(to_char(add_months(sysdate,-0),'yyyymm')) from dual;

How we can convert number to date

select to_char(to_date(202007,'yyyymm'),'dd-mon-yyyy') from dual;


No comments:

Post a Comment

AddToAny

Contact Form

Name

Email *

Message *