That last commit was rubbish, this is the proper fix - don't convert datetime values to strings