I am creating a timer job for SharePoint 2016 on premise calendar event task. The function is to send reminder email to event attendees 1 day prior to event occurrence. I am creating a timer job to fetch the event attendees list (start time-date time field(need only date)) which is going to occur on next day and send email to attendees.

I created a CAML query to fetch the attendees who has events the next day in order to send email reminder 1 day prior but it is not working.

Using VS to create the timer job.

Can you please help me out? screenshot of list

My query:

sPQuery.Query = "<Where><Eq><FieldRef Name=\"Start_x0020_Time\" /><Value IncludeTimeValue='FALSE' Type=\"DateTime\"><Today OffsetDays = 1/></Value></Eq></Where>";
  • Are you using default calendar list or you are using custom list here? Commented Sep 6, 2022 at 12:33
  • default calendar list. and also created a new attendees list to save the attendees and events data from calendar list
    – user105078
    Commented Sep 6, 2022 at 13:17
  • actually this query fetches data from attendees list
    – user105078
    Commented Sep 6, 2022 at 13:18
  • sPQuery.Query = "<WHERE><Eq><FieldRef Name = \"Start_x0020_Time\" />< Value Type = \"DateTime\"><Today Offset = \"1\" /></ Value ></Eq></WHERE >";
    – user105078
    Commented Sep 6, 2022 at 13:20
  • tried the above but it fetches all list items
    – user105078
    Commented Sep 6, 2022 at 13:20

1 Answer 1


It seems that you are missing double quote in OffsetDays attribute under Today element

Try below query and it should work:

sPQuery.Query = "<Where><Eq><FieldRef Name=\"Start_x0020_Time\" /><Value IncludeTimeValue='FALSE' Type=\"DateTime\"><Today OffsetDays=\"1\"/></Value></Eq></Where>";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.