locked
Calculate Time difference in Access Web App RRS feed

  • Question

  • I keep getting a "Syntax error in expression" when trying to calculate the difference in hours between two times. I have tried two methods:

    DATEDIFF([starttime], [endtime],"h")

    and

    DATEDIFF("h",[starttime], [endtime])

    neither seems to work.


    John Fletcher

    Saturday, April 9, 2016 4:38 PM

Answers

  • Just answered my own question! You apparently don't need the quotation marks. I used

    DATEDIFF(hour,[starttime], [endtime]) and it worked fine.


    John Fletcher

    • Marked as answer by SpaceData Saturday, April 9, 2016 4:44 PM
    Saturday, April 9, 2016 4:44 PM

All replies

  • Just answered my own question! You apparently don't need the quotation marks. I used

    DATEDIFF(hour,[starttime], [endtime]) and it worked fine.


    John Fletcher

    • Marked as answer by SpaceData Saturday, April 9, 2016 4:44 PM
    Saturday, April 9, 2016 4:44 PM
  • Hi John,

    I am glad your issue has been resolved, and thanks for sharing.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, April 11, 2016 1:39 AM