我如何将英文日期转换为尼泊尔日期 [英] How do i convert English date to Nepali date

查看:33
本文介绍了我如何将英文日期转换为尼泊尔日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将英文日期 2017/11/11 转换为其尼泊尔日期(根据尼泊尔日历的日期).我搜索了很多文章,但找不到任何基于此的文章.请帮助

How do i convert English date 2017/11/11 to its Nepali date(date according to Nepali calendar) .I have searched lot of article but couldn't found any article based on that.Please help

推荐答案

Nepali Calendar 基于 Bikram Sambat 并且是 56 岁零 8比克拉姆桑巴特日历提前几个月开始公元前 57 年作者:印度比克拉玛蒂亚国王.

Nepali Calendar is based on Bikram Sambat and is 56 years and 8 months ahead of A.D. The Bikram Sambat calendar was started in 57 B.C. by King Bikramaditya in India.

这两个日期之间大约相差 57 年 8 个月零 16 天.要获得 BS 日期,您需要在 AD 日期上加上 57 年 8 个月零 16 天.但主要问题是可能会有+/- 3天的差异

there is an approximate difference of 57 years, 8 months and 16 days between these dates. To obtain BS date, you need to add 57 years, 8 months and 16 days to AD date. But the main problem is that there may be a difference of +/- 3 days

我假设 56 岁零 8 个月

I Assuming 56 years and 8 months

SELECT GETDATE() AS 'English Date',
   DATEADD(MONTH,8,DATEADD(YEAR,56,GETDATE())) AS 'Nepali date'

有关 DATEADD 的更多信息

for more information about DATEADD

访问 http://sqlhints.com/2014/07/05/how-to-add-days-weeks-months-quarters-or-years-to-a-date-in-sql-server/

这篇关于我如何将英文日期转换为尼泊尔日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆