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 5927981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:14:27+00:00 2026-05-22T14:14:27+00:00

My team is building a web app in Asp.Net with C# on SQL Server

  • 0

My team is building a web app in Asp.Net with C# on SQL Server Express R2. Currently, we’re developing in Visual Studio 2010 with the database hosted on a separate server. We’re running the app on the development server of our home computers.

If I change my home computer date format to d/M/yyyy and the date format I want in M/d/yyyy for my code, I get errors. It accepts dates up to the 12th day of the month because it assumes the day field is actually the month field. After that, I get a giant format exception when I try to convert the string to a DateTime. This is a huge problem and our client wants the date format in M/d/yyyy.

I’ve tried everything I can think of!

Changing the web.config doesn’t work:

<globalization culture="auto:en-US" uiCulture="auto:en" />

Using a format when converting:

String strDate = myDate.ToString("M/d/yyyy")

Using a format and culture info when converting:

DateTime myDate = Convert.ToDateTime(strDate, new CultureInfo("en-CA"));

None of this works! We’re in a real pinch right now, I’d appreciate any information on the matter. At the moment, I can only hope when we run it on the actual server, it will run correctly if the server’s date is formatted properly.

  • 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-22T14:14:27+00:00Added an answer on May 22, 2026 at 2:14 pm
     DateTime.ParseExact("12/15/2009", "M/d/yyyy", new CultureInfo("en-CA"));
    

    This should work

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

Sidebar

Related Questions

My team is considering building our next web app using the ASP.NET MVC framework.
I am part of a development team building a new ASP.NET 3.5 web application.
I'm part of a team building an ADO.NET based web-site. We sometimes have several
I'm building an Asp.net MVC 2 application. I have an entity called Team that
I am building my first ASP.Net web application project in VS2010. The site has
We're a small team of developers and building a web application. We're currently having
I have a problem with building performance profile for my .net web app See
I am building a build script for our web development team. We will be
My team is moving from Visual SourceSafe to Subversion soon, while developing/supporting a legacy
I am currently developing a Web Site (not a Web Application) in VS2008. I

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.