diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -25,7 +25,7 @@ function quoteIdent(value) {
     } else if (value === true) {
         return '"t"';
     } else if (value instanceof Date) {
-        value = formatDate(value.toISOString());
+        return '"' + formatDate(value.toISOString()) + '"';
     } else if (Array.isArray(value) === true) {
         throw new Error('SQL identifier cannot be an array');
     } else if (value === Object(value)) {
@@ -65,7 +65,7 @@ function quoteLiteral(value) {
     } else if (value === true) {
         return "'t'";
     } else if (value instanceof Date) {
-        value = formatDate(value.toISOString());
+        return "'" + formatDate(value.toISOString()) + "'";
     } else if (Array.isArray(value) === true) {
         var temp = [];
         for (var i = 0; i < value.length; i++) {
@@ -121,7 +121,7 @@ function quoteString(value) {
         }
         return temp.toString();
     } else if (value === Object(value)) {
-        value = JSON.stringify(value);
+        return JSON.stringify(value);
     }
 
     return value.toString();
For dates, surround ISO string with quotes rather than treat it as an ordinary string.