How to get JUST month name from a date?

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.
 
DateTime.ToString ("MMMM")

I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.
 
Something like:

Dim MyString As String = "10/1/2004"
Dim MyDateTime As DateTime = DateTime.Parse(MyString, new
CultureInfo("en-US"))
Dim Month As String = MyDateTime.ToString("MMMM", new CultureInfo("en-US"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top