Quantcast
Channel: Everyday I'm coding » timespan
Browsing all 2 articles
Browse latest View live

Calculating relative time

Given a specific DateTime value, how do I display relative time, like 2 hours ago 3 days ago a month ago etc…? Solution: Jeff, your code is nice but could be clearer with constants (as suggested in...

View Article



.NET How to serialize a TimeSpan to XML

I am trying to serialize a .NET TimeSpan object to XML and it is not working. A quick google has suggested that while TimeSpan is serializable, the XmlCustomFormatter does not provide methods to...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images