如何在 SQL 中将公历日期转换为波斯日期(Jalali)?

时间:2021-01-25 09:22:52

标签: sql sql-server date datetime converters

我想在以下代码中将公历日期转换为波斯语

select  cast(dateGregorian as persianDate) date
from order
where orderid = ?

1 个答案:

答案 0 :(得分:0)

使用此解决方案

select  FORMAT(dateGregorian ,'yyyy/MM/dd','fa') date
from order
where orderid = ?

enter image description here