Get Integer Value of Month from Current Date in C# and VB .Net

sarathbabu
 
on Mar 07, 2013 01:22 AM
3480 Views

Hi,

  How to get two digit month from current date in asp.net like 03 for march?

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Mudassar
 
on Mar 07, 2013 01:24 AM

This way

C#

int month = DateTime.Now.Month;

VB

Dim month As Integer = DateTime.Now.Month