formatter for SQL timestamps