Use DateTime.ParseExact
.
this.Text="22/11/2009";
DateTime date = DateTime.ParseExact(this.Text, "dd/MM/yyyy", null);
More Related Contents:
- DateTime vs DateTimeOffset
- How to create a new object instance from a Type
- Parse DateTime with time zone of form PST/CEST/UTC/etc
- Is DateTime.Now the best way to measure a function’s performance? [closed]
- Algorithm to detect overlapping periods [duplicate]
- How to create a .NET DateTime from ISO 8601 format
- Generics in C#, using type of a variable as parameter [duplicate]
- How to get difference between two dates in Year/Month/Week/Day?
- How to know if a DateTime is between a DateRange in C#
- Measuring code execution time
- Get Month name from month number
- How do I represent a time only value in .NET?
- convert double to int
- Why enums require an explicit cast to int type?
- Convert DateTime for MySQL using C#
- .NET : How do you get the Type of a null object?
- Parse C# string to DateTime
- How do I get the AM/PM value from a DateTime?
- Getting Date or Time only from a DateTime Object
- Determine if a type is static
- Convert String to Date in .NET if my incoming date format is in YYYYMMDD
- Why can’t Double be implicitly cast to Decimal
- How to parse and generate DateTime objects in ISO 8601 format
- How to switch between “possible” type of an object? [duplicate]
- DateTime conversion from string C#
- DateTime.Parse(“2012-09-30T23:00:00.0000000Z”) always converts to DateTimeKind.Local
- How do I check if a type provides a parameterless constructor?
- Convert DateTime to long and also the other way around
- LINQ Query to Convert string to datetime
- .NET DateTime to SqlDateTime Conversion