You can do this by adding your timespan to the date.
TimeSpan timespan = new TimeSpan(03,00,00);
DateTime time = DateTime.Today.Add(timespan);
string displayTime = time.ToString("hh:mm tt"); // It will give "03:00 AM"
More Related Contents:
- Encrypt and decrypt a string in C#? [closed]
- How to make an HTTP POST web request
- Enum “Inheritance”
- Load an EXE file and run it from memory
- Where are the Properties.Settings.Default stored?
- Convert a list to a string in C#
- Cursor.Current vs. this.Cursor
- ObserveOn and SubscribeOn – where the work is being done
- Declare a const array
- Task sequencing and re-entracy
- How can I encrypt selected properties when serializing my objects?
- Memory Leak in C#
- Why isn’t ArrayList marked [Obsolete]?
- Forms not responding to KeyDown events
- How to highlight wrapped text in a control using the graphics?
- Visual Studio 2013 doesn’t discover unit tests
- What reference do I need to use Microsoft.Office.Interop.Excel in .NET?
- winforms html editor [closed]
- Generating XML file using XSD file
- How can I handle forms authentication timeout exceptions in ASP.NET?
- Thread parameters being changed
- GO statements blowing up sql execution in .NET
- XmlSerializer Performance Issue when Specifying XmlRootAttribute
- When to use record vs class vs struct
- “The operation is not valid for the state of the transaction” error and transaction scope
- sizeof() equivalent for reference types?
- AES encryption on large files
- How to insert a Symbol (Pound, Euro, Copyright) into a Textbox
- C# Socket.BeginReceive/EndReceive
- Why does StandardOutput.Read() block when StartInfo.RedirectStandardInput is set to true?