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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:23:33+00:00 2026-05-29T21:23:33+00:00

We are creating an application that will be shipped through the whole world, while

  • 0

We are creating an application that will be shipped through the whole world, while importing and exporting files of different formats.

We should use the Invariant Culture for these standard files.

However, the invariant culture is just like the EN-US culture, instead of really providing a standard international way of writing.

That being said, I’d like to change at least the date format for this culture. But the following code just throws exceptions:

CultureInfo format = System.Globalization.CultureInfo.InvariantCulture;
format.DateTimeFormat.FullDateTimePattern = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
return format;

What would be the correct way to have an IFormatProvider that formats any kind of variable, but has an international way of writing dates?

  • 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-29T21:23:34+00:00Added an answer on May 29, 2026 at 9:23 pm

    The invariant culture is just that, invariant. You can’t change it.

    This culture is intended for .NET applications which need to save data in a way which is portable across cultures.

    It is not intended that users are shown or should care about the format this data takes, it should always be converted to their particular culture before seeing the data.

    As far as what you could do if you really wanted this DateTime format is to start defining a new culture (possibly based off the Invariant culture if you want).

    var myStandardCulture = (CultureInfo)System.Globalization.CultureInfo.InvariantCulture.Clone();
    myStandardCulture.DateTimeFormat.FullDateTimePattern = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
    return myStandardCulture;
    

    The downside of defining your own culture, is other .NET applications which try to read your files would also need to be told about all of your new culture rules rather than just accepting the InvariantCulture rules built into .NET

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

Sidebar

Related Questions

I'm creating an application that will store geolocation data for specific transactions. Should I
I'm creating a splash screen that will display while my Android application loads. I'd
I'm creating an application that will store a hierarchical collection of items in an
I am creating an application that will have a list of items that can
I am creating a small application that will be deployed on Window. The database
I'm currently creating an MVC application that will likely to expand to include a
I am creating an application in .NET that will serve as a second UI
I am creating a desktop/client application that will be installed on +/- 5 PCs,
I am interested in creating a simple web application that will take in user
I'm currently creating an application for a customer that will allow them to automatically

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.