I’m saving military time into the database. Then I need to pull this data back out of the database. To get just the time without the date I can do this:
String.Format("{0:T}", pullsaved.First.timeValue)
But this returns a six digit time, e.g. 100000 (HHmmss). But I want it to return just HHmm (1000). I tried the following, but it didn’t work…any ideas?
DateTime.ParseExact(String.Format("{0:T}", pullsaved.First.timeValue), "HHmm", CultureInfo.InvariantCulture)
or