String was not recognized as a valid DateTime

Bans123 60 Reputation points
2026-01-24T16:16:15.4866667+00:00

Hello we have this error "String was not recognized as a valid DateTime. The pc has the same format in short time and long time and also date in both user and admin account. This occur when whe are going to update our software to latest available version.

As a remedy we will login to admin account and patcher will automatically run upon signing in. Our problem is given it is very time inconvenient because it is not available for end user and we will remote it to get things done.

Hopefully anyone can help me with this here.

[Moved from Microsoft System Center | System Center Service Manager]

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Quinnie Quoc 11,815 Reputation points Independent Advisor
2026-01-25T05:17:09.3666667+00:00

Dear Bans123

Thank you for your message. I understand that you are encountering the error “String was not recognized as a valid DateTime” when updating your software to the latest version. This issue often occurs when the system’s regional or culture settings do not match the expected format required by the application, even if the short and long date formats appear identical.

I recommend checking the system locale and language settings to ensure they are consistent across both the user and administrator accounts. Additionally, verify that the patcher or update process is running under the same culture settings, as mismatches can trigger this error. If possible, configure the application to use invariant culture or explicitly set the DateTime format expected by the software.

I understand that logging in with the administrator account to run the patcher is inconvenient. Automating the update process with elevated privileges or adjusting the application’s configuration may help reduce the need for manual intervention.

I hope this guidance helps you move forward. Please click “Accept the answer” to support me. Thank you very much.

Kind regards,

QQ.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-01-24T16:16:25.5033333+00:00

    The error "String was not recognized as a valid DateTime" typically occurs when a string representation of a date or time does not match the expected format for the current culture or regional settings. Here are some steps to troubleshoot and resolve this issue:

    1. Check Date and Time Formats: Ensure that the date and time formats in the system settings (both user and admin accounts) are consistent and match the expected formats in your application. SQL Server recognizes dates in the following formats:
      • YYYYMMDD
      • MM/DD/YYYY
    2. Regional Settings: Verify that the regional settings on the PC are set correctly. Sometimes, the format might differ based on user settings, which can lead to this error.
    3. Test with Different Formats: If possible, try passing dates in different formats to see if the issue persists. This can help identify if the format is the root cause.
    4. Error Handling: Implement error handling in your application to catch and log the specific string that is causing the conversion failure. This can provide insight into what is being passed when the error occurs.
    5. Patching Process: Since you mentioned that the issue arises during a software update, ensure that the patching process does not alter the expected date formats or regional settings.

    If the issue continues, consider reaching out to Microsoft support or consulting documentation related to your specific software for additional guidance.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.