What,s the .Net equivalent to Excel VBA's format(x,"dmm

madwab

New Member
Joined
Jan 4, 2005
Messages
41
I know this is getting a bit off topic, but I'm just starting with VB.Net and haven't yet found a forum as useful as this one - recommendations gratefully received...

In Excel VBA I can get today's date to display as 28Nov05 with

Msgbox (Format(Now(),"dmmmyy")).

Just to get a UK date in VB.Net, I've had to code

Msgbox (Now().Day.ToString() & "/" & Now().Month.ToString() & "/" & Now().Year.ToString())

...which gives a "dd/mm/yy" format, but I'm sure there's a simpler way; and neither my book, nor te help files, nor Google has revealed how to change '11' to 'Nov'. Any .Net .Nutters out there?

Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
And the answers are

a. Use vbforums.com for VB questions

b. Now().ToString("dMMMyy") formats now appropriately.
 
Upvote 0

Forum statistics

Threads
1,224,856
Messages
6,181,427
Members
453,040
Latest member
Santero

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top