.net - Is it possible to make a date datatype accept 13 as a month and 30 for all months? -


I am in Ethiopia and we have 13 months. With 5 or 6 days of 12 each and 13 months, I want to sort my data by date using the binding source sort method. But to do so, I need to set my date field date data type. When I set up the DataType to date, I can not enter some values ​​for the value of the month at 13 and on the second month in 30 days of value.

What do I need to accept my application for all months as one day and one day as 30, so that I can sort my data by date. Is it possible to establish culture for my application or through any other medium?

In theory, you can refer to the language / country related to Ethiopia CultureInfo It seems that the ISO 639 short code in the original language is "M" and the ISO 3166 country code for Ethiopia is "ET", thus it seems that the correct "AM-AT" for Ethiopia is Thus, try the following.

  CultureInfo Ethiopia = New CultureInfo ("AM-At"); Int Year = 2002; // Currently Ethiopia Intel is in the month 2002 = Ethiopia Calendor.Getmonths Yuan (year); For (Int i = 1; I & lt; = months; I ++) {console. Weidline (Ethiopia calendar.Gate days inmanth (year, I)); }  

and then,

  date time = new date time (2002, 13, 5, Ethiopian calendar);  

Will be legal.

If for some reason that does not work, you can also see how to create a custom calendar by using it as an example. / P>


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -