fixed NoMethodError when a table includes datetime column