Created
December 6, 2012 16:41
-
-
Save kevinblake/4225907 to your computer and use it in GitHub Desktop.
Using timeago.js with C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List View bound fields | |
<asp:BoundField DataField="Timestamp" HeaderText="Timestamp" ReadOnly="True" SortExpression="Timestamp" HtmlEncode="False" DataFormatString="<abbr class='timeago' title='{0:yyyy'-'MM'-'dd HH':'mm':'ss'Z'}'>{0}</abbr>" /> | |
In code: | |
DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment