# Week of year shows up as a number, need a date or date range

G

George Wilson

I am creating a report which is currently showing the week of the year
an event will happen and it is showing as a number (1 through 52) I
need for this to show up as a date range or the date of that Monday of
that week. My current syntax reporting this week # is:
=format$([date], "ww",0,0)
Is there a way to convert this to a date?
 
W

Wayne Morgan

=Format(DateSerial(Year([Date]), Month([Date]), Day([Date])-WeekDay([Date])+1), "Short
Date") & " to " & Format(DateSerial(Year([Date]), Month([Date]),
Day([Date])-WeekDay([Date])+7), "Short Date")

I recommend against using a reserved word as a name. Date is a reserved word. It may not
cause you a problem here, but you could run into problems in the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top