[英]How to display date only in vb.net
I need to display date only in vb.net. 我只需要在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.
此<%= Formatdatetime(f_purchasedate,2)%>有效。 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.