View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Markus Scheible[_2_] Markus Scheible[_2_] is offline
external usenet poster
 
Posts: 95
Default give back times of current month automatically

Hi Newsgroup,

I need a code which automatically gives me the number of
days from the current month (e.g. 31 in January, 28 in
February a.s.o.)... some days before, I got the following
code:

Day(DateSerial(Year(Date), Month(Date), 0))


But the problem is that this gives back "31" even today -
when "28" would have been very much better ;o)

Does anyone have a better idea?

Thanks in advance and best regards

Markus