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)
 
Back
Top