DateTime ParseExact Time 10:10:13 AM hh mm ss tt null

DateTime ParseExact Time 10:10:13 AM hh mm ss tt null

DateTime ParseExact method to Time format DateTime.ParseExact Time (10:10:13 AM, hh:mm:ss tt, null). Vb.net and C#.net example.

Date Time Example C#

C#.net DateTime ParseExact Time string

using System;
using System.Globalization;
namespace DateAndTime.Examples
{
class Program
{
static void Main(string[] args)
{
DateTime parseTimeString = DateTime.ParseExact("13:13:30 pm", "HH':'mm':'ss 'pm'", null);
Console.WriteLine("Parse Exact Time string is {0}", parseTimeString);     
Console.ReadLine();
}
}
}
VB.net-Program

VB.net DateTime Parse Exact Example.

Imports System.Globalization
Namespace DateAndTime.Examples
Class Program
Private Shared Sub Main(args As String())
Dim parseTimeString As DateTime = DateTime.ParseExact("13:13:30 pm", "HH':'mm':'ss 'pm'", Nothing)
Console.WriteLine("Parse Exact Time string is {0}", parseTimeString)
Console.ReadLine()
End Sub
End Class
End Namespace
Output

Parse Exact Time string is 1/1/2012 1:13:30 PM.

Other DateTime Examples

How to format Time in C#.net and VB.net program.
DateTime Time Format string {HH:mm:ss}.
C#.net date time Culture.
C#.net DateTime Month.
string was not recognized as a valid date time
Get Today
DateTime in English UK format
Get Day Of year
DateTime.Today vs DateTime.Now
DateTime Parse Exact method.

Tags:

html without using tables tableless html table less html css tableless layoutsDateTimeTryParse using C# and VB.net exampleRegular expression for date pattern yyyy-mm-ddC# DateTime DifferenceCheck Email AddressDateTime.ParseExact ExamplePassword HackRead pop3 email attachments componentGridview select emailASP.net monitor server IRequiresSessionState and session

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.