View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DaveMZ[_2_] DaveMZ[_2_] is offline
external usenet poster
 
Posts: 4
Default add 1 day to date variable

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,