Added helper function for formatting a date for Solr.