How to write an Oracle function to convert dates to Persian (jalali)

I want to convert date to Persian date (jalali) in oracle Database is there any function?

+5
source share
2 answers

You can use this statement:

select to_char(hiredate,'yyyy/mm/dd','nls_calendar=persian') from emp

hiredateis a date field, with this select is hiredatedisplayed in Persian

+10
source

If Oracle does not have its own function, you can write it yourself. The following site shows how to do this. The code is easily translated into PLSQL.

http://www.codeproject.com/Articles/13465/Jalali-Calendar

0
source

All Articles