How to

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

How to get month or day from date as string.?
the string will depend on language settings

mydate.Month returns number but i want the string representing this number
like JANUARY, DECEMBER..or in french JANVIER....or in croatia... whatever
 
* "Mat said:
How to get month or day from date as string.?
the string will depend on language settings

mydate.Month returns number but i want the string representing this number
like JANUARY, DECEMBER..or in french JANVIER....or in croatia... whatever

Convert it to a 'DateTime' first using
'DateTime.Parse'/'DateTime.ParseExact'. Then get the month from the
'DateTime'.
 
Mat said:
How to get month or day from date as string.?
the string will depend on language settings

mydate.Month returns number but i want the string representing this
number
like JANUARY, DECEMBER..or in french JANVIER....or in croatia...
whatever

Untested:

system.threading.thread.currentthread.currentuiculture.Datetimeformat.monthn
ames(mydate.month - 1)
 

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

Back
Top