Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Representing date having 32 as maximum value for Day

I am building application in asp.net using Sql server 2005. In my application I have to represent many dates & dates are of Nepali(Bikram sambhat) in which the maximum day for some month can be 32.

So what is the best option to represent the date in sql server so that 32 can be placed for day value & that can be easily compared(manipulated) in sql server as well as in asp.net?

like image 473
ramkumar Avatar asked Feb 18 '11 18:02

ramkumar


1 Answers

There is a guy that has implemented some classes for converting between Nepali dates and Gregorian dates. This way you can input dates in the Nepali format but store them in a format that SQL Server understands. Look here: http://rrajbhandari.blogspot.com/2010/06/bikram-sambat-classes-and-controls.html

Remember that a date in either calendar can be converted to another calendar - they point to the same day.

like image 190
Rune Grimstad Avatar answered Sep 17 '22 09:09

Rune Grimstad