VB.NET & DateValue() - DateValue() : Returns a Variant of subtype Date. … Dim MyDate MyDate = DateValue(”September 11, 1963″) ‘ Return a date.
ShotDev Focus:
- VB.NET & DateValue()
Example
DateValue.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Session.LCID = 1033 Me.lblText1.Text = DateValue("01-Sep-2008") Me.lblText2.Text = DateValue("Sep-01-2008") Me.lblText3.Text = DateValue("Sep 01 2008") Me.lblText4.Text = DateValue("09-01-2008") Me.lblText5.Text = DateValue("09/01/2008") End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText1" runat="server"></asp:Label><br /> <asp:Label id="lblText2" runat="server"></asp:Label><br /> <asp:Label id="lblText3" runat="server"></asp:Label><br /> <asp:Label id="lblText4" runat="server"></asp:Label><br /> <asp:Label id="lblText5" runat="server"></asp:Label><br /> </form> </body> </html>
Screenshot