cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
I have an issue currently where the only formatting option I can find for my TimeSpan to prevent it showing the fractions of the second, is to remove them from the TimeSpan. I'd really like to set a format of hh:mm:ss for my timespan, and keep the fractional seconds as they are used in album duration calculation and DO make a difference for the purposes to which i'm applying them
For example, my grid looks like:
00:05:30.0400000
00:03:59.9860000
00:04:15
00:05:00
00:05:05.5870000
00:04:14.7470000
00:03:15.2260000
the two shorter ones are by pure coincidence exactly on the second - the TimeSpan have no milliseconds component. Unlike Date, TimeSpan doesnt have a formattabke ToString, does anyone have any other ideas for showing them as hh:mm:ss but retaining their millisecond component in the data backend?
For example, my grid looks like:
00:05:30.0400000
00:03:59.9860000
00:04:15
00:05:00
00:05:05.5870000
00:04:14.7470000
00:03:15.2260000
the two shorter ones are by pure coincidence exactly on the second - the TimeSpan have no milliseconds component. Unlike Date, TimeSpan doesnt have a formattabke ToString, does anyone have any other ideas for showing them as hh:mm:ss but retaining their millisecond component in the data backend?