471,338 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Get Month

I've trawled the web, but have not found a clear answer to this.

How do i get the current month as a integer?

eg, this month is july, so it would return 7.

Thanks

Rob
Jul 22 '05 #1
2 2637
Hi Rob,

Try this

System.DateTime.Today.Month.ToString()

From
Nirmal

"P1ayboy" wrote:
I've trawled the web, but have not found a clear answer to this.

How do i get the current month as a integer?

eg, this month is july, so it would return 7.

Thanks

Rob

Jul 22 '05 #2
Brilliant! Thanks Nirmal.

"Nirmal" wrote:
Hi Rob,

Try this

System.DateTime.Today.Month.ToString()

From
Nirmal

"P1ayboy" wrote:
I've trawled the web, but have not found a clear answer to this.

How do i get the current month as a integer?

eg, this month is july, so it would return 7.

Thanks

Rob

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Hasanain F. Esmail | last post: by
4 posts views Thread by Ronald Celis | last post: by
6 posts views Thread by Ante Perkovic | last post: by
reply views Thread by larry | last post: by
22 posts views Thread by Stan | last post: by
19 posts views Thread by edfialk | last post: by
6 posts views Thread by Nkhosinathie | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.