add function to convert datestring to datetime.date

This is required when working with sqlite. With mysql you get away without it.
update views to convert datestrings to datetime.date() using string_to_date