c# - Time display format -


i want display time in mvc4 appication in particular format.

[displayformat(dataformatstring = "{0:f}")] public datetime eve_date { get; set; } 

i use above format.

i want date in following format: sun, 11 july 2013, 5.30 pm. how possible?

try code,

[displayformat( dataformatstring="{0:ddd, d mmmm yyyy, hh.mm tt}", applyformatineditmode=true )] public datetime eve_date { get; set; } 

usage,

@html.editorfor(m => m.eve_date) 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -