i want to convert date to Persian date (jalali) in oracle Database there is any function ?
Just use: select to_date(date_value, 'yyyy-mm-dd') as date_value from table; To convert to a date. That's it!
The TO_DATE function allows you to define the format of the date/time value. For example, we could insert the '3-may-03 21:02:44' value as follows: insert into table_name (date_field) values (TO_DATE('2003/05/03 21:02:44', 'yyyy/mm/dd hh24:mi:ss')); Learn more about the TO_DATE function.
The Oracle TO_CHAR() function converts a DATE or INTERVAL value to a string in a specified date format. The Oracle TO_CHAR() function is very useful for formatting the internal date data returned by a query in a specific date format.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With