c# how to format datetime code example Example: asp.net format datetime @String.Format("{0:dd MMM yyyy HH:mm}", item.Date).ToString()