Skip to main content
Hi, 

I am trying to add a few hours to a DateTime using SOQL. Any suggestion how I should do it? I tried this code which is not working:

DateTime CreatedOn = CreatedDate.addHours(-4);

SELECT count(CaseNumber)   FROM Case  WHERE day_only(CreatedOn)=TODAY

Thanks!
6 respuestas
  1. 27 abr 2015, 4:01 p.m.
    Thank you Manoj, 

    I get "unexpected token: DateTime" when I run your query.