date

unknown

Registered User.
Local time
Today, 10:42
Joined
May 4, 2003
Messages
19
in my reports and forms i want the date to be that fridays date.

Ex if i entered data a printed now it would display 6/6/2003 instead of 6/4/2003
 
well i havent learned anything about modules so im not sure about the second part. now on to the first post, is this correct


=Format(Date()-Weekday(Date(),6)+1,"mmmm dd"", ""yyyy")
 
Last edited:
Unknown-

The difference between Ricky's response (Post #1) and mine (Post #2) is that Ricky provided a response tailored specifically to the writer's stated situation (Week starts on Wednesday, ends on Tuesday).

Post #2 was a generic response, where the user could specify the starting weekday. While Post #2 looks much more complex, strip it of the comments, explanations, etc., and it boils down to one line of code--very similar to Ricky's.

Ricky, I know, will set me straight if I've messed this up, but it appears that UnKnown picked up on only the first line of the code. Believe it should read:
=Format(Date()-Weekday(Date(),4)+1,"mmmm dd"", ""yyyy") & " - " &
Format(Date()-Weekday(Date(),4)+7,"mmmm dd"", ""yyyy")

or, in Unknown's situation:

=Format(Date()-Weekday(Date(),6)+1,"mmmm dd"", ""yyyy") & " - " & Format(Date()-Weekday(Date(),6)+7,"mmmm dd"", ""yyyy")

Give that a try.

Bob
 
Last edited:
ok i tried, i have a lable and then a text box, i put that code "
=Format(Date()-Weekday(Date(),6)+1,"mmmm dd"", ""yyyy") & " - " & Format(Date()-Weekday(Date(),6)+7,"mmmm dd"", ""yyyy") " into the text box, when i click out of the text box it goes away, its not there in preview view either,
 
Ricky-

This is your monster. Jump in here and make it right! If you haven't by Thursday morning, I'll give it a shot (but rest assured that I'll say ugly things about your response time!!!)

Bob
 
Last edited:
Given that you only want to display the coming Friday's date, and not a date range, couldn't you use:

=Format(Date()-Weekday(Date(),1)+6,"mmmm dd"", ""yyyy")

Nb:

* Date()-Weekday(Date(),1) takes the date back to last "First day" (ie: Sunday)

* +6 advances forward to the 6th day (Friday)

The "Format( **,"mmmm dd"", ""yyyy") simply displays the resultant date in your requested format.

Works for me.

Brad.
 
LOL ... sorry Bob ... I've been tied up on some some Admin things at the "other site" ... and have not seen the post.

It appears that the solution was found and "all in well in Access Land".

RDH
 

Users who are viewing this thread

Back
Top Bottom