Use DateTime.ParseExact
, e.g.:
DateTime.ParseExact("12/02/21 10:56:09", "yy/MM/dd HH:mm:ss",
CultureInfo.InvariantCulture
).ToString("MMM. dd, yyyy HH:mm:ss")
More Related Contents:
- VB Net Class in C# [closed]
- What is a NullReferenceException, and how do I fix it?
- How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)?
- Setting Objects to Null/Nothing after use in .NET
- Custom Compiler Warnings
- Difference in months between two dates
- Way to have String.Replace only hit “whole words”
- When is a custom attribute’s constructor run?
- Capture screenshot Including Semitransparent windows in .NET
- How do I determine a mapped drive’s actual path?
- Get File Icon used by Shell
- Difference with Parameters.Add and Parameters.AddWithValue
- How to find overlapping controls that I added to form?
- How to flatten nested objects with linq expression
- Inconsistency in divide-by-zero behavior between different value types
- What is a predicate in c#? [duplicate]
- Winforms: Application.Exit vs Environment.Exit vs Form.Close
- Install to same path when upgrading application
- Get the SourceControl of a DropDownMenu
- .NET Configuration (app.config/web.config/settings.settings)
- Compare compiled .NET assemblies?
- How to Start a Process Unelevated
- Is .NET 4.0 Compatible with Windows XP SP2 or below? [closed]
- Save Settings in VB.Net or C#
- .NET graph library around? [closed]
- center MessageBox in parent form [duplicate]
- How to get status code from webclient?
- How does the “Using” statement translate from C# to VB?
- Objects implicitly instantiated in vb.net?
- How do I make a form modal in Windows Forms?