Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
admin  
#1 Posted : Saturday, February 28, 2026 8:46:11 AM(UTC)
admin

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; }
Users browsing this topic
Guest (2)
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.