I have a gridview. Then inside the gridview have a column called Birthday. When I load from the database, it always shows time format dd/MM/yyyy hh:mm:ss.
How i gonna make it show dd/MM/yyyy only?Convert datetime to shortdate...?
in the asp:bound, set EncodeHtml = false, dataformatstring={0:dd/MM/yyyy}Convert datetime to shortdate...?
eg:
DateTime dt = new DateTime();
dt = DateTime.Now;
dt.ToShortDateString();
You have more methods in the DateTime struct.
No comments:
Post a Comment