time period

for this scenario, Date: 17-Augu-2016 10:00 to 16-Aug-2016 10:00 it should throw error or alert like end date is lesser than start date. but its saving in wrong date. like its saving from Date: 1-Augu-2016 10:00 to 17-Aug-2016 10:00. how to fix this issue.
How to validate start date and end date,because start date must not be greater then end date.