TimeSpan ts = new TimeSpan(14, 43, 00); DateTime dt = DateTime.Today.Add(ts); string s = dt.ToString("h:mm tt");
static TimeSpan ParseTimeSpan(string s) { DateTime datum = DateTime.Today; TimeSpan result = DateTime.Parse(datum.ToString("MM/dd/yyyy") + " " + s).Subtract(datum); return result; }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.