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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashukite
    New Member
    • Jan 2010
    • 14

    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 monthes. 12 of them with 30 days each and 13th month with 5 or 6 days. I want to sort my data by date using the bindingsource sort method. But to do that I need to set my date field a date data type. When i set the datatype to date, i can't enter some values like 13 for the month value and 30 for day value of 2nd month.

    What I want is just to make my application accept 13 as a month and 30 as a day for all monthes, so that i can sort my data by date. Is it possible to do so by setting culture for my application or by some other means? please help?
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    you could add a separate column in your datatable to account for the extra epagomenal days... then sort your data by both columns. for instance: here would be a sample table sorted descending first by Column1 then by Column2:

    RegDate----------------EpaDate

    12/30/09--------------- 1/5/2010
    12/30/09----------------1/4/2010
    12/30/09----------------1/3/2010
    12/30/09----------------1/2/2010
    12/30/09----------------1/1/2010
    12/30/09------------------NULL
    12/29/09------------------NULL
    12/28/09------------------NULL

    etc...


    so in effect any row you have where RegDate = '12/30'
    and EpDate Is Not NULL is your extra month

    Comment

    • ashukite
      New Member
      • Jan 2010
      • 14

      #3
      I can't get your idea, would you please make it a bit clear?

      Comment

      • ashukite
        New Member
        • Jan 2010
        • 14

        #4
        I can't get your idea, would you please make it a bit clear?

        Comment

        • ashukite
          New Member
          • Jan 2010
          • 14

          #5
          how can i calculate the epagomenal dates by code

          Comment

          • modmans2ndcoming
            New Member
            • Sep 2008
            • 11

            #6
            Why not just track what day of the year it is and use offsets to discover what day of what month you are in then report that back to the system that is interested?

            Comment

            • ashukite
              New Member
              • Jan 2010
              • 14

              #7
              Thanks I got it i will try it that way!

              Comment

              Working...