I need to Display the Time In my GridView taking Data from Database.
I have the Time in the Format
2012-03-07 11:51:45.000
How can I show the DateTime In the following way Like Gmail Does?

If it is Todays Date the Time Should be displayed. Or else The Date Should be Displayed in this Format.
Can you Help Me?
Create a function in code behind that will cast your
DateTimeto the required format, and then render it usingTemplateField.Code:
Markup: