Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997510
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:24:39+00:00 2026-05-20T07:24:39+00:00

The exception message returns: Year, Month, and Day parameters describe an un-representable DateTime. The

  • 0

The exception message returns:

Year, Month, and Day parameters
describe an un-representable DateTime.

The exception hits the monthCalendar1.SelectionStart

            DateTime check_date = monthCalendar1.SelectionStart;

            for (int index = 0; index <= 5; index++)
            {
                check_date = new DateTime(check_date.Year, check_date.Month, check_date.Day - index);

            }

I also tried this one. but another exception has occured TargetInvocationException

                DateTime check_date = monthCalendar1.SelectionStart;

                for (int index = 0; index <= 5; index++)
                {
                    check_date = check_date.AddDays(-index);

                }

Exception details:

System.ArgumentOutOfRangeException was unhandled
Message=Year, Month, and Day parameters describe an un-representable DateTime.
Source=mscorlib
StackTrace:
at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)
at TestGetDates.Program.Main(String[] args) in C:\Documents and Settings\ngd11\My Documents\Visual Studio 2010\Projects\TestGetDates\TestGetDates\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:24:40+00:00Added an answer on May 20, 2026 at 7:24 am
      date_tax.Day - index
    

    this might be producing a negative number that is causing this exception, debug and check its value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am getting the following error. Exception information: Message: SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns
The exact exception message would be helpful, too. Thanks.
I'm seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the
Should I create private static final String = Some exception message or leave it
Is there a way to filter exceptions in elma using the exception message? Examples:
I've recently updated 1 logging component to log Exception.ToString rather than Exception.Message.ToString(), the problem
I need to write the local time information , the exception message to a
I have a JSPX (X!) page where I want to show an exception (message
Instead of throwing new Exception(Some message, maybeSomeCause) , which means that all callers of
What is better to use for Exception output message dynamic generation String or StringBuilder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.