I need to display date only in vb.net. These are the steps I went through.
the methods i've used are:
<%=Formatdatetime(f_purchasedate,2)%>
<%=FormatDateTime(f_purchasedate, "Short Date")%>
<%Response.Write(FormatDateTime(f_purchasedate, 2))%>
Please help. Thanks
EDIT: Was looking at the wrong place. this <%=Formatdatetime(f_purchasedate,2)%> works. Thanks for the help guys
Try This
<%=Formatdatetime(f_purchasedate,2)%>
<%=FormatDateTime(f_purchasedate, "Short Date")%>
<%Response.Write(FormatDateTime(f_purchasedate, DateFormat.ShortDate))%>
OR
<%Response.Write(f_purchasedate.ToString("yyyy-MM-dd")))%>
f_purchasedate.ToString("d")
请参阅: http : //msdn.microsoft.com/en-us/library/az4se3k1%28v=vs.110%29.aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.