Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to get month from current date

Tags:

date

vb.net

Am trying to extract month from the current date but in vain. I am using the code:

    Format(Today.Date, "mmmm")

However when I try to run it to display month like January it instead displays 00. I thought that this would work but it isn't. What can I do to get the month from current date in vb.net using a simple approach like a single function?

like image 432
ken Avatar asked Dec 21 '22 10:12

ken


1 Answers

Try This :

DateTime.Today.ToString("MMMM")

Check out This for detailed date formatting options.

like image 115
Abdusalam Ben Haj Avatar answered Jan 16 '23 19:01

Abdusalam Ben Haj