By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

Calculated Date = 4 weeks before Date ... How ?

P: n/a
Hi, I need a Calculated Date = 4 weeks before Date which is in table ...
How ?
--
Dave Allison ~ Scotland
Nov 12 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query
design grid:
CalcDate: DateDiff("d", -28, [MyDate])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David Allison" <david.allison@zz**@zzzzzblueyonder.co.uk> wrote in message
news:MS*****************@news-binary.blueyonder.co.uk...
Hi, I need a Calculated Date = 4 weeks before Date which is in table ...

Nov 12 '05 #2

P: n/a
Cheers - I will try this
--
Dave Allison ~ Scotland
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:3f**********************@freenews.iinet.net.a u...
Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query
design grid:
CalcDate: DateDiff("d", -28, [MyDate])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David Allison" <david.allison@zz**@zzzzzblueyonder.co.uk> wrote in message news:MS*****************@news-binary.blueyonder.co.uk...
Hi, I need a Calculated Date = 4 weeks before Date which is in table
....

Nov 12 '05 #3

P: n/a
Form for booking holidays -I have -
DateofBooking ... DateofTravel .... fields in table

On the form I have .........
payment of deposit is due.... =[DateofBooking]+28 ......... got that working
OK :>)

Still cant get payment of balance due (12 weeks before
DateofTravel)...........thought it would be
=[DateofTravel]-84 ????????

Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query
design grid:
CalcDate: DateDiff("d", -28, [MyDate])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David Allison" <david.allison@zz**@zzzzzblueyonder.co.uk> wrote in message news:MS*****************@news-binary.blueyonder.co.uk...
Hi, I need a Calculated Date = 4 weeks before Date which is in table
....

Nov 12 '05 #4

P: n/a
> Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query
design grid:
CalcDate: DateDiff("d", -28, [MyDate])


I think Allen meant:

CalcDate: DateAdd("d", -28, [MyDate])

:-)
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #5

P: n/a
Gives Invalid . or !

--
Dave Allison ~ Scotland
"Bruce M. Thompson" <bthmpson@big_NOSPAM_foot.com> wrote in message
news:vr************@corp.supernews.com...
Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query
design grid:
CalcDate: DateDiff("d", -28, [MyDate])


I think Allen meant:

CalcDate: DateAdd("d", -28, [MyDate])

:-)
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access) NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<

Nov 12 '05 #6

P: n/a
Provided Access recognises DateOfTravel as a Date/Time field, then:
=[DateOfTravel] - 84
should work. Set the Format property of this text box to:
Short Date

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David Allison" <david.allison@zz**@zzzzzblueyonder.co.uk> wrote in message
news:7E*****************@news-binary.blueyonder.co.uk...
Form for booking holidays -I have -
DateofBooking ... DateofTravel .... fields in table

On the form I have .........
payment of deposit is due.... =[DateofBooking]+28 ......... got that working OK :>)

Still cant get payment of balance due (12 weeks before
DateofTravel)...........thought it would be
=[DateofTravel]-84 ????????

Create a query into this table.
If the field is called MyDate, type this into a fresh column of the query design grid:
CalcDate: DateDiff("d", -28, [MyDate])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David Allison" <david.allison@zz**@zzzzzblueyonder.co.uk> wrote in

message
news:MS*****************@news-binary.blueyonder.co.uk...
Hi, I need a Calculated Date = 4 weeks before Date which is in table

Nov 12 '05 #7

P: n/a
> Gives Invalid . or !

That would have to be derived from an argument passed to the function. If you
are using this in a form, post your code. If you are using this in a query, post
the expression you are using.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #8

P: n/a
I have a field DateofTravel on the form and in table where date is stored.

I need balence due date which is 12 weeks before DateofTravel.

((I managed easily to get deposit due date which is 4 weeks after booking)
=[DateofBooking]+28

--
Dave Allison ~ Scotland
"Bruce M. Thompson" <bthmpson@big_NOSPAM_foot.com> wrote in message
news:vr************@corp.supernews.com...
Gives Invalid . or !
That would have to be derived from an argument passed to the function. If

you are using this in a form, post your code. If you are using this in a query, post the expression you are using.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<

Nov 12 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.