added exception handling and datetime formatting for MySQL
removed redundent else statement
Merge branches 'master' and 'current'