[Solved] String terminator for converting Time Strings [duplicate]
parse the string into components; possibly by position, possibly with Parse, possibly with regex decide what rules you want for each output use it For example: static string SimplifyTime(string value) { var match = Regex.Match(value, “([0-9]{2})hr:([0-9]{2})min:([0-9]{2})sec”); if (!match.Success) return value; int val = int.Parse(match.Groups[1].Value, CultureInfo.InvariantCulture); if (val > 0) return val + “hr Ago”; val … Read more