I want to convert the Gregorian date to Persian in the following code
select cast(dateGregorian as persianDate) date
from order
where orderid = ?
Use this solution
select FORMAT(dateGregorian ,'yyyy/MM/dd','fa') date
from order
where orderid = ?

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