Southlis
»
Forum
»
Asp.net
»
Hiển thị ngày trong view
Rank: Administration
Groups: Administrators
Joined: 12/24/2017(UTC) Posts: 2,811
|
@DateTime.Parse(Model.NgayGio) .ToString("dd/MM/yyyy h:mm:ss tt")
Giải thích: dd → ngày MM → tháng yyyy → năm hh → giờ 12h HH → giờ 24h tt → AM/PM
Hoặc sửa trong model [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy h:mm:ss tt}", ApplyFormatInEditMode = true)] public DateTime NgayGio { get; set; }
|
|
|
|
|
|
Southlis
»
Forum
»
Asp.net
»
Hiển thị ngày trong view
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.