Home All Groups Group Topic Archive Search About

Format(Date, "mmddyy") in VB.NET

Author
14 Jul 2006 4:57 PM
fniles
How do you do Format(Date, "mmddyy") in VB.NET ?
Thank you

Author
14 Jul 2006 5:09 PM
Kerry Moorman
fniles,

You can still use the Format function, or you can use the date variable's
ToString method:

        Dim myDate As Date = DateTime.Now

        MsgBox(Format(myDate, "MMddyy"))
        MsgBox(myDate.ToString("MMddyy"))

Kerry Moorman


Show quoteHide quote
"fniles" wrote:

> How do you do Format(Date, "mmddyy") in VB.NET ?
> Thank you
>
>
>
Author
14 Jul 2006 6:30 PM
Herfried K. Wagner [MVP]
"fniles" <fni***@pfmail.com> schrieb:
> How do you do Format(Date, "mmddyy") in VB.NET ?

'MsgBox(Format(Date, "MMddyy"))'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>