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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:48:17+00:00 2026-05-11T20:48:17+00:00

I use a VB6/COM+ application which outputs date/time values based on the short date

  • 0

I use a VB6/COM+ application which outputs date/time values based on the short date settings in the Control Panel, Regional Settings, for the user that runs it. The program that then parses that output has a configurable setting for the date format it expects, and presents in the UI.

e.g. If the regional setting for the user is set to mm/dd/yyyy, and it outputs 06/18/2009, the application expecting “18/06/2009” fails with “String was not recognized as a valid DateTime”.

As we usually run this application as a service account, which we have not logged in as interactively to create a profile, we generally set the correct date format and then tick the “Apply all settings to the current user account and the default user profile” option.

I would like to be make the C# configuration utility I have written for this mess to be able to set the date format programmatically for a given user.

Edit
I would like nothing more than to change the code, but do not have the ability to do so at this time.

I also know that what I am asking is a bad thing to do. With regards to “it should be the user’s choice” – I am that user, as I create it explicitly for the task; I just want to set the date format by a scripted method, rather than having to do the clicking myself.

  • 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-11T20:48:17+00:00Added an answer on May 11, 2026 at 8:48 pm

    This is specifically discouraged by Microsoft. Any solution you may come up with will be a filthy hack that will probably stop working soon.

    Think of it this way: who are you to decide those settings? Don’t you think that’s the user’s decision?

    Back on topic: find an unambiguous format for the applications to communicate in, such as YYYYMMDD. The application that displays can then simply respect the actual user settings, as it should.

    But, since you can’t change it, just poke into the registry:

    Current user:

    HKEY_CURRENT_USER\Control Panel\International
    

    Specific user:

    HKEY_USERS\(user SID)\Control Panel\International
    

    Default user:

    HKEY_USERS\.DEFAULT\Control Panel\International
    

    sShortDate is probably the value you want to change.

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

Sidebar

Ask A Question

Stats

  • Questions 207k
  • Answers 207k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Adding the following code after doing the necessary changes solved… May 12, 2026 at 9:27 pm
  • Editorial Team
    Editorial Team added an answer It depends what visiting edit.php?id=12 does. Does it actually change… May 12, 2026 at 9:27 pm
  • Editorial Team
    Editorial Team added an answer Solaris ... You probably need to run "nawk" instead of… May 12, 2026 at 9:27 pm

Related Questions

I have a COM+ component developed with VB6. After registering it with the component
I'm busy building a software update application in C#, WinForms, .NET 3.5, where I
I need an out of process C# COM component to host a 32 bit
I recently wrote a quick-and-dirty proof-of-concept proxy server in C# as part of an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.