C
Charles Law
I have a 'timespan' which is specified in an unusual way. For example, to
specify 47 hours and 26 minutes, the timepsan is specified as
47:26
If I use Timespen.TryParse on this then, of course, it fails. Can anyone
think of a neat way to decode timespans specified in this way? I also have
timespans specified as
3.30
which would mean 3hrs and 30 minutes.
I realise that I could split the values and format my own timespan, but I am
wondering if there is a one-liner built-in.
TIA
Charles
specify 47 hours and 26 minutes, the timepsan is specified as
47:26
If I use Timespen.TryParse on this then, of course, it fails. Can anyone
think of a neat way to decode timespans specified in this way? I also have
timespans specified as
3.30
which would mean 3hrs and 30 minutes.
I realise that I could split the values and format my own timespan, but I am
wondering if there is a one-liner built-in.
TIA
Charles