|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to get; number of days in a given monthThe .net framework data object supplies this functionality
Look at System.Date Show quoteHide quote "Ivan Jericevich" <i***@oberon.co.za> wrote in message news:ezvKpbdKHHA.4928@TK2MSFTNGP06.phx.gbl... > > Ivan,
Supply the year and month to DateTime.DaysInMonth. For example: Console.WriteLine(DateTime.DaysInMonth(2006, 11)) Kerry Moorman Show quoteHide quote "Ivan Jericevich" wrote: > > > "Ivan Jericevich" <i***@oberon.co.za> wrote in message Dim dt As Date = #2/5/2006#news:ezvKpbdKHHA.4928@TK2MSFTNGP06.phx.gbl... > Console.WriteLine("Days In Month = {0}", _ DateTime.DaysInMonth(dt.Year, dt.Month)) gives you 28 Robin S. |
|||||||||||||||||||||||