working with dates

H

Hru48

Hey all,

I need a cell to work to return the first and last day of the month i
is in without me having to type anything in. In the format mm/dd/yyyy
mm/dd/yyyy

I was thinking I could use date(now) and then use date difference t
figure this out but i'm not too sure on the syntax.

Any help would be great.

Thanks
 
R

Roger Govier

Hi

=DATE(YEAR(TODAY()),MONTH(TODAY()),1) for first of month
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0) for last of month
works on the 0th day of a month is equal to last day of previous month

so
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),1),"mm/dd/yyyy") &" - " &
TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+0,0),"mm/dd/yyyy")
 
R

Ron Rosenfeld

Hey all,

I need a cell to work to return the first and last day of the month it
is in without me having to type anything in. In the format mm/dd/yyyy -
mm/dd/yyyy

I was thinking I could use date(now) and then use date difference to
figure this out but i'm not too sure on the syntax.

Any help would be great.

Thanks.


=TEXT(TODAY()-DAY(TODAY())+1,"mm/dd/yyyy")
&" - " & TEXT(TODAY()-DAY(TODAY())+32-DAY(
TODAY()-DAY(TODAY())+32),"mm/dd/yy")


--ron
 
Top