Reputation: 1401
i want to convert date to Persian date (jalali) in oracle Database there is any function ?
Upvotes: 13
Views: 16082
Reputation: 1
First of all you must set nls_calendar
to Persian like below:
Alter session set nls_calendar=persian;
Now you can change format of date like below:
Select to_char(sysdate,'yyyy/mm/dd') from dual;
Upvotes: -1
Reputation: 271
You can use this statement:
select to_char(hiredate,'yyyy/mm/dd','nls_calendar=persian') from emp
hiredate
is a date field, with this select hiredate
is displayed in persian
Upvotes: 27