Report from and to in header with a twist

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi All,
I have the need for a from and to date in the header of the report
Fairly common.
But I am computing the start date for accuracy using DateAdd.
The report is always 14 days.
I am trying to format the date as "mmmm dd, yyyy
Here is the syntax I have tried
=DateAdd("d",-13,Format([EndDate],"mmmm dd"", ""yyyy")) & " - " &
Format([EndDate],"mmmm dd"", ""yyyy")
I get 10/1/05 - October 14, 2005
I wanted October 1, 2005 - October 14, 2005
Thanks for your assistance.
Bill
 
Bill,

Try it like this...
=Format(DateAdd("d",-13,[EndDate]),"mmmm dd"", ""yyyy") & " - " &
Format([EndDate],"mmmm dd"", ""yyyy")
 
Bill said:
Hi All,
I have the need for a from and to date in the header of the report
Fairly common.
But I am computing the start date for accuracy using DateAdd.
The report is always 14 days.
I am trying to format the date as "mmmm dd, yyyy
Here is the syntax I have tried
=DateAdd("d",-13,Format([EndDate],"mmmm dd"", ""yyyy")) & " - " &
Format([EndDate],"mmmm dd"", ""yyyy")
I get 10/1/05 - October 14, 2005
I wanted October 1, 2005 - October 14, 2005


You've got the functions backwards:

=Format(DateAdd("d",-13,[EndDate]), "mmmm dd"", ""yyyy") & "
- " & Format([EndDate],"mmmm dd"", ""yyyy")
 
Thanks Guys,
I don't know where my first Thank You went,
I apologize for not responding. Thanks, worked as both of you stated.
Bill
Marshall Barton said:
Bill said:
Hi All,
I have the need for a from and to date in the header of the report
Fairly common.
But I am computing the start date for accuracy using DateAdd.
The report is always 14 days.
I am trying to format the date as "mmmm dd, yyyy
Here is the syntax I have tried
=DateAdd("d",-13,Format([EndDate],"mmmm dd"", ""yyyy")) & " - " &
Format([EndDate],"mmmm dd"", ""yyyy")
I get 10/1/05 - October 14, 2005
I wanted October 1, 2005 - October 14, 2005


You've got the functions backwards:

=Format(DateAdd("d",-13,[EndDate]), "mmmm dd"", ""yyyy") & "
- " & Format([EndDate],"mmmm dd"", ""yyyy")
 
Back
Top