LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default give back times of current month automatically

Sorry mate, but that is exactly what that does. Date is today's date, and
it works out the days in the month by going to the 0th day of the month
after today's month, which is the last day of this month, and extract that
day number.

On the 1st March that code will return 31 if you run it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Markus Scheible" wrote in message
...
Hi Bob,

well, that does not automatically change into 31 when it
is March 1st... so I will have the same problems like
before...

I would need something that *automatically* finds out
which month is "today" and which gives me the days... and
which doesn't need to be changed by the beginning of a new
month... you see?

Nevertheless, thanks for your idea.

Best

Markus



-----Original Message-----
day(Dateserial(Year(Date),Month(Date)+1, 0))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Markus Scheible"

wrote in message
...
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



.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rolling chart to show 13 months back from current month PBcorn Charts and Charting in Excel 2 February 7th 09 11:34 AM
How to give back a value, based in another table? Rodrigo Excel Discussion (Misc queries) 0 June 11th 08 03:19 PM
Saving file as current month name automatically gold Excel Discussion (Misc queries) 2 August 25th 07 05:34 PM
automatically update chart plotting current month and previous 6 Jane Charts and Charting in Excel 1 September 1st 05 10:19 PM
Do you give memory back? cogent Excel Programming 1 May 5th 04 08:08 PM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"