add 1 day to date variable

D

DaveMZ

Hello, hopefully somebody can help me,

I'm retrieving 2 records from an Access table, a start date and a due date.
I'd like to retrieve a 3rd record, which would be the start date + 1.
However, the following doesn't work:

st = DatePart("d", rs.Fields("tasks.task_ass_date"))
due = DatePart("d", rs.Fields("task_ddate"))
next = st + 1

It gives me a compile error: expected: variable.

Does anyone have any suggestions? Thanks in advance for any help,
 
M

Mike

Dave Try this
st = DatePart("d", rs.Fields("tasks.task_ass_date")) + 1
due = DatePart("d", rs.Fields("task_ddate"))
 

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