Want the query to figure a future date

D

diesel

I have a table containing three fields, LastName, FirstName, AdmitDate. I
want to write a query that will figure the HPDate which is the AdmitDate plus
3 days.
 
D

diesel

I guess I am confused. When I do this it asked for a start date. If I leave
it blank it doesn't figure anything. I just want it to figure the dates
automatically.
--
diesel


Banana said:
In query builder, put this in a column:

HPDate: DateAdd("d", 3, [AdmitDate])
I have a table containing three fields, LastName, FirstName, AdmitDate. I
want to write a query that will figure the HPDate which is the AdmitDate plus
3 days.
 
J

John W. Vinson

I guess I am confused. When I do this it asked for a start date. If I leave
it blank it doesn't figure anything. I just want it to figure the dates
automatically.
--

From... what? Today's date? If so replace [Admit Date] with Date().
 
K

KenSheridan via AccessMonster.com

It should work. Switch to SQL view and paste the following in place of
whatever is there, substituting your real table name in place of 'MyTable'.

SELECT [FirstName], [LastName], [AdmitDate],
DateAdd("d", 3, [AdmitDate]) AS HPDate
FROM [MyTable];

Ken Sheridan
Stafford, England
I guess I am confused. When I do this it asked for a start date. If I leave
it blank it doesn't figure anything. I just want it to figure the dates
automatically.
In query builder, put this in a column:
[quoted text clipped - 3 lines]
 

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