Is there any date converter which converts AD to BS?

hello everyone,
I have a process where i have to use nepali date (BS). is there any date converter to converts date from AD to BS .
I have found some packages but they done have enough instructions how to use them ?

@Prabin_Chand

Please check this

Try this let input date is 1/8/2022

Npdate = datetime.Parseexact(inputdate,"M/d/yyyy",System.Globalization.cultureinfo.Invariantculture).Addyears(56).Addmonths(8).ToString("yyyy/MM/dd")

Cheers

1 Like

Hi @Prabin_Chand

Try this function:

Date = datetime.Parseexact(‘Your input date’, “M/d/yyyy”,System.Globalization.cultureinfo.Invariantculture).Addyears(56).Addmonths(8).ToString(“dd/MM/yyyy”)

Regards,
Kaviyarasu N

1 Like

its not showing proper date.


Its not showing proper date



@Prabin_Chand

Can you please tell what is not proper?

cheers

I did tried to convert my Date of Birth to BS but the output result is incorrect.


Output is incorrect .

Output must be : 20/04/2055

@Prabin_Chand

Please try this

datetime.Parseexact(inputdate,"M/d/yyyy",System.Globalization.cultureinfo.Invariantculture).Addyears(56).Addmonths(8).AddDays(16).ToString("yyyy/MM/dd")

But there would be 3 days =/- exact difference could not be found

cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.