diff --git a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-cleanjson/alltypes_01.1.json b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-cleanjson/alltypes_01.1.json
index 5081d69..dd319a4 100644
--- a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-cleanjson/alltypes_01.1.json
+++ b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-cleanjson/alltypes_01.1.json
@@ -1,2 +1,2 @@
-[ { "id": 10, "string": "Nancy", "float": 32.5, "double": -2013.5938237483274, "boolean": true, "int8": 125, "int16": 32765, "int32": 294967295, "int64": 1700000000000000000, "unorderedList": [ "reading", "writing" ], "orderedList": [ "Brad", "Scott" ], "record": { "number": 8389, "street": "Hill St.", "city": "Mountain View" }, "date": { "date": -125625945600000}, "time": { "time": 44430000}, "datetime": { "datetime": -123703587570000}, "duration": { "duration": { "months": 131, "millis": 1075830000} }, "point": [41.0, 44.0], "point3d": [44.0, 13.0, 41.0], "line": [ [10.1, 11.1], [10.2, 11.2] ], "rectangle": [ [5.1, 11.8], [87.6, 15.6548] ], "polygon": [ [1.2, 1.3], [2.1, 2.5], [3.5, 3.6], [4.6, 4.8] ], "circle": [ [10.1, 11.1], 10.2 ], "binary": "ABCDEF0123456789", "uuid": "5c848e5c-6b6a-498f-8452-8847a2957421" }
+[ { "id": 10, "string": "Nancy", "float": 32.5, "double": -2013.5938237483274, "boolean": true, "int8": 125, "int16": 32765, "int32": 294967295, "int64": 1700000000000000000, "unorderedList": [ "reading", "writing" ], "orderedList": [ "Brad", "Scott" ], "record": { "number": 8389, "street": "Hill St.", "city": "Mountain View" }, "date": "-2011-01-27", "time": "12:20:30.000Z", "datetime": "-1951-12-27T12:20:30.000Z", "duration": "P10Y11M12DT10H50M30S", "point": [41.0, 44.0], "point3d": [44.0, 13.0, 41.0], "line": [ [10.1, 11.1], [10.2, 11.2] ], "rectangle": [ [5.1, 11.8], [87.6, 15.6548] ], "polygon": [ [1.2, 1.3], [2.1, 2.5], [3.5, 3.6], [4.6, 4.8] ], "circle": [ [10.1, 11.1], 10.2 ], "binary": "ABCDEF0123456789", "uuid": "5c848e5c-6b6a-498f-8452-8847a2957421" }
  ]
diff --git a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-losslessjson/alltypes_01.1.json b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-losslessjson/alltypes_01.1.json
index 5ee58be..2e99438 100644
--- a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-losslessjson/alltypes_01.1.json
+++ b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01-losslessjson/alltypes_01.1.json
@@ -1,2 +1,2 @@
-[ { "id": { "int64": 10 }, "string": "Nancy", "float": 32.5, "double": -2013.5938237483274, "boolean": true, "int8": { "int8": 125 }, "int16": { "int16": 32765 }, "int32": { "int32": 294967295 }, "int64": { "int64": 1700000000000000000 }, "unorderedList": { "unorderedlist": [ "reading", "writing" ] }, "orderedList": { "orderedlist": [ "Brad", "Scott" ] }, "record": { "number": { "int64": 8389 }, "street": "Hill St.", "city": "Mountain View" }, "date": { "date": -125625945600000}, "time": { "time": 44430000}, "datetime": { "datetime": -123703587570000}, "duration": { "duration": { "months": 131, "millis": 1075830000} }, "point": { "point": [41.0, 44.0] }, "point3d": { "point3d": [44.0, 13.0, 41.0] }, "line": { "line":  [ { "point": [10.1, 11.1] }, { "point": [10.2, 11.2] } ] }, "rectangle": { "rectangle": [{ "point": [5.1, 11.8] }, { "point": [87.6, 15.6548] } ] }, "polygon": { "polygon": [{ "point": [1.2, 1.3] },{ "point": [2.1, 2.5] },{ "point": [3.5, 3.6] },{ "point": [4.6, 4.8] }] }, "circle": { "circle": [ { "point": [10.1, 11.1] }, 10.2 ] }, "binary": "ABCDEF0123456789", "uuid": "5c848e5c-6b6a-498f-8452-8847a2957421" }
+[ { "id": { "int64": 10 }, "string": "Nancy", "float": 32.5, "double": -2013.5938237483274, "boolean": true, "int8": { "int8": 125 }, "int16": { "int16": 32765 }, "int32": { "int32": 294967295 }, "int64": { "int64": 1700000000000000000 }, "unorderedList": { "unorderedlist": [ "reading", "writing" ] }, "orderedList": { "orderedlist": [ "Brad", "Scott" ] }, "record": { "number": { "int64": 8389 }, "street": "Hill St.", "city": "Mountain View" }, "date": { "date": "-2011-01-27" }, "time": { "time": "12:20:30.000Z" }, "datetime": { "datetime": "-1951-12-27T12:20:30.000Z" }, "duration": { "duration": "P10Y11M12DT10H50M30S" }, "point": { "point": [41.0, 44.0] }, "point3d": { "point3d": [44.0, 13.0, 41.0] }, "line": { "line":  [ { "point": [10.1, 11.1] }, { "point": [10.2, 11.2] } ] }, "rectangle": { "rectangle": [{ "point": [5.1, 11.8] }, { "point": [87.6, 15.6548] } ] }, "polygon": { "polygon": [{ "point": [1.2, 1.3] },{ "point": [2.1, 2.5] },{ "point": [3.5, 3.6] },{ "point": [4.6, 4.8] }] }, "circle": { "circle": [ { "point": [10.1, 11.1] }, 10.2 ] }, "binary": "ABCDEF0123456789", "uuid": "5c848e5c-6b6a-498f-8452-8847a2957421" }
  ]
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/PrintTools.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/PrintTools.java
index 6f94c92..596e168 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/PrintTools.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/PrintTools.java
@@ -18,19 +18,172 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers;
 
-import java.io.IOException;
-import java.io.OutputStream;
-
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+
 public class PrintTools {
 
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
+
+    public static void printDateString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
+
+        try {
+            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, GregorianCalendarSystem.Fields.YEAR, GregorianCalendarSystem.Fields.DAY, false);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    public static void printDateTimeString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
+
+        try {
+            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, GregorianCalendarSystem.Fields.YEAR, GregorianCalendarSystem.Fields.MILLISECOND, true);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+
+    }
+
+    public static void printDayTimeDurationString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        boolean positive = true;
+        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
+
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (milliseconds < 0) {
+            milliseconds *= -1;
+            positive = false;
+        }
+
+        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
+        int second = gCalInstance.getDurationSecond(milliseconds);
+        int minute = gCalInstance.getDurationMinute(milliseconds);
+        int hour = gCalInstance.getDurationHour(milliseconds);
+        int day = gCalInstance.getDurationDay(milliseconds);
+
+        if (!positive) {
+            ps.print("-");
+        }
+        try {
+            ps.print("P");
+            if (day != 0) {
+                WriteValueTools.writeInt(day, ps);
+                ps.print("D");
+            }
+            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
+                ps.print("T");
+            }
+            if (hour != 0) {
+                WriteValueTools.writeInt(hour, ps);
+                ps.print("H");
+            }
+            if (minute != 0) {
+                WriteValueTools.writeInt(minute, ps);
+                ps.print("M");
+            }
+            if (second != 0 || millisecond != 0) {
+                WriteValueTools.writeInt(second, ps);
+            }
+            if (millisecond > 0) {
+                ps.print(".");
+                WriteValueTools.writeInt(millisecond, ps);
+            }
+            if (second != 0 || millisecond != 0) {
+                ps.print("S");
+            }
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    public static void printDurationString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        boolean positive = true;
+        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
+        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
+
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (months < 0 || milliseconds < 0) {
+            months *= -1;
+            milliseconds *= -1;
+            positive = false;
+        }
+
+        int month = gCalInstance.getDurationMonth(months);
+        int year = gCalInstance.getDurationYear(months);
+        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
+        int second = gCalInstance.getDurationSecond(milliseconds);
+        int minute = gCalInstance.getDurationMinute(milliseconds);
+        int hour = gCalInstance.getDurationHour(milliseconds);
+        int day = gCalInstance.getDurationDay(milliseconds);
+
+        if (!positive) {
+            ps.print("-");
+        }
+        try {
+            ps.print("P");
+            if (year != 0) {
+                WriteValueTools.writeInt(year, ps);
+                ps.print("Y");
+            }
+            if (month != 0) {
+                WriteValueTools.writeInt(month, ps);
+                ps.print("M");
+            }
+            if (day != 0) {
+                WriteValueTools.writeInt(day, ps);
+                ps.print("D");
+            }
+            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
+                ps.print("T");
+            }
+            if (hour != 0) {
+                WriteValueTools.writeInt(hour, ps);
+                ps.print("H");
+            }
+            if (minute != 0) {
+                WriteValueTools.writeInt(minute, ps);
+                ps.print("M");
+            }
+            if (second != 0 || millisecond != 0) {
+                WriteValueTools.writeInt(second, ps);
+            }
+            if (millisecond > 0) {
+                ps.print(".");
+                WriteValueTools.writeInt(millisecond, ps);
+            }
+            if (second != 0 || millisecond != 0) {
+                ps.print("S");
+            }
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    public static void printTimeString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        int time = AInt32SerializerDeserializer.getInt(b, s + 1);
+
+        try {
+            gCalInstance.getExtendStringRepUntilField(time, 0, ps, GregorianCalendarSystem.Fields.HOUR, GregorianCalendarSystem.Fields.MILLISECOND, true);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
     public enum CASE {
         LOWER_CASE,
         UPPER_CASE,
     }
 
-
     public static void writeUTF8StringAsCSV(byte[] b, int s, int l, OutputStream os) throws IOException {
         int stringLength = UTF8StringPointable.getUTFLength(b, s);
         int position = s + 2; // skip 2 bytes containing string size
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
index c1f952e..cedecff 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
@@ -18,20 +18,15 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.adm;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
-import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
-import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 
 public class ADatePrinter implements IPrinter {
 
-    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
     public static final ADatePrinter INSTANCE = new ADatePrinter();
-    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() {
@@ -41,17 +36,7 @@
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
         ps.print("date(\"");
-        printString(b, s, l, ps);
+        PrintTools.printDateString(b, s, l, ps);
         ps.print("\")");
     }
-
-    public void printString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
-
-        try {
-            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, Fields.YEAR, Fields.DAY, false);
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
-    }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
index b3f60e2..54381f5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
@@ -18,19 +18,15 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.adm;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
-import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
-import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 
 public class ADateTimePrinter implements IPrinter {
 
     public static final ADateTimePrinter INSTANCE = new ADateTimePrinter();
-    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() {
@@ -40,18 +36,7 @@
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
         ps.print("datetime(\"");
-        printString(b, s, l, ps);
+        PrintTools.printDateTimeString(b, s, l, ps);
         ps.print("\")");
     }
-
-    public void printString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        try {
-            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, Fields.YEAR, Fields.MILLISECOND, true);
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
-
-    }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
index 59da5d5..e23b3ab 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
@@ -18,19 +18,16 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.adm;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
-import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
 
 public class ADayTimeDurationPrinter implements IPrinter {
 
     public static final ADayTimeDurationPrinter INSTANCE = new ADayTimeDurationPrinter();
-    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() throws AlgebricksException {
@@ -39,56 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        boolean positive = true;
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
-        if (milliseconds < 0) {
-            milliseconds *= -1;
-            positive = false;
-        }
-
-        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
-        int second = gCalInstance.getDurationSecond(milliseconds);
-        int minute = gCalInstance.getDurationMinute(milliseconds);
-        int hour = gCalInstance.getDurationHour(milliseconds);
-        int day = gCalInstance.getDurationDay(milliseconds);
-
         ps.print("day-time-duration(\"");
-        if (!positive) {
-            ps.print("-");
-        }
-        try {
-            ps.print("P");
-            if (day != 0) {
-                WriteValueTools.writeInt(day, ps);
-                ps.print("D");
-            }
-            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
-                ps.print("T");
-            }
-            if (hour != 0) {
-                WriteValueTools.writeInt(hour, ps);
-                ps.print("H");
-            }
-            if (minute != 0) {
-                WriteValueTools.writeInt(minute, ps);
-                ps.print("M");
-            }
-            if (second != 0 || millisecond != 0) {
-                WriteValueTools.writeInt(second, ps);
-            }
-            if (millisecond > 0) {
-                ps.print(".");
-                WriteValueTools.writeInt(millisecond, ps);
-            }
-            if (second != 0 || millisecond != 0) {
-                ps.print("S");
-            }
-            ps.print("\")");
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
+        PrintTools.printDayTimeDurationString(b, s, l, ps);
+        ps.print("\")");
     }
-
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
index 589626c..26c6fc0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
@@ -18,15 +18,12 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.adm;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
-import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
 
 public class ADurationPrinter implements IPrinter {
 
@@ -40,67 +37,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        boolean positive = true;
-        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
-
-        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
-        if (months < 0 || milliseconds < 0) {
-            months *= -1;
-            milliseconds *= -1;
-            positive = false;
-        }
-
-        int month = gCalInstance.getDurationMonth(months);
-        int year = gCalInstance.getDurationYear(months);
-        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
-        int second = gCalInstance.getDurationSecond(milliseconds);
-        int minute = gCalInstance.getDurationMinute(milliseconds);
-        int hour = gCalInstance.getDurationHour(milliseconds);
-        int day = gCalInstance.getDurationDay(milliseconds);
-
         ps.print("duration(\"");
-        if (!positive) {
-            ps.print("-");
-        }
-        try {
-            ps.print("P");
-            if (year != 0) {
-                WriteValueTools.writeInt(year, ps);
-                ps.print("Y");
-            }
-            if (month != 0) {
-                WriteValueTools.writeInt(month, ps);
-                ps.print("M");
-            }
-            if (day != 0) {
-                WriteValueTools.writeInt(day, ps);
-                ps.print("D");
-            }
-            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
-                ps.print("T");
-            }
-            if (hour != 0) {
-                WriteValueTools.writeInt(hour, ps);
-                ps.print("H");
-            }
-            if (minute != 0) {
-                WriteValueTools.writeInt(minute, ps);
-                ps.print("M");
-            }
-            if (second != 0 || millisecond != 0) {
-                WriteValueTools.writeInt(second, ps);
-            }
-            if (millisecond > 0) {
-                ps.print(".");
-                WriteValueTools.writeInt(millisecond, ps);
-            }
-            if (second != 0 || millisecond != 0) {
-                ps.print("S");
-            }
-            ps.print("\")");
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
+        PrintTools.printDurationString(b, s, l, ps);
+        ps.print("\")");
     }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
index 1c0adc6..99c02e8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -45,26 +46,21 @@
 
         short typetag = AInt8SerializerDeserializer.getByte(b, s + 1 + 8 * 2);
 
-        IPrinter timeInstancePrinter;
-
         if (typetag == ATypeTag.DATE.serialize()) {
             ps.print("-date(\"");
-            timeInstancePrinter = ADatePrinter.INSTANCE;
-            ((ADatePrinter) timeInstancePrinter).printString(b, s + 4, 4, ps);
+            PrintTools.printDateString(b, s + 4, 4, ps);
             ps.print(", ");
-            ((ADatePrinter) timeInstancePrinter).printString(b, s + 12, 4, ps);
+            PrintTools.printDateString(b, s + 12, 4, ps);
         } else if (typetag == ATypeTag.TIME.serialize()) {
             ps.print("-time(\"");
-            timeInstancePrinter = ATimePrinter.INSTANCE;
-            ((ATimePrinter) timeInstancePrinter).printString(b, s + 4, 4, ps);
+            PrintTools.printTimeString(b, s + 4, 4, ps);
             ps.print(", ");
-            ((ATimePrinter) timeInstancePrinter).printString(b, s + 12, 4, ps);
+            PrintTools.printTimeString(b, s + 12, 4, ps);
         } else if (typetag == ATypeTag.DATETIME.serialize()) {
             ps.print("-datetime(\"");
-            timeInstancePrinter = ADateTimePrinter.INSTANCE;
-            ((ADateTimePrinter) timeInstancePrinter).printString(b, s, 8, ps);
+            PrintTools.printDateTimeString(b, s, 8, ps);
             ps.print(", ");
-            ((ADateTimePrinter) timeInstancePrinter).printString(b, s + 8, 8, ps);
+            PrintTools.printDateTimeString(b, s + 8, 8, ps);
         } else {
             throw new AlgebricksException("Unsupport internal time types in interval: " + typetag);
         }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ATimePrinter.java
index 06861a6..10c4575 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ATimePrinter.java
@@ -18,19 +18,16 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.adm;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
-import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 
 public class ATimePrinter implements IPrinter {
 
     public static final ATimePrinter INSTANCE = new ATimePrinter();
-    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() {
@@ -40,18 +37,7 @@
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
         ps.print("time(\"");
-        printString(b,s,l, ps);
+        PrintTools.printTimeString(b, s, l, ps);
         ps.print("\")");
     }
-
-    public void printString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int time = AInt32SerializerDeserializer.getInt(b, s + 1);
-
-        try {
-            gCalInstance.getExtendStringRepUntilField(time, 0, ps, Fields.HOUR, Fields.MILLISECOND, true);
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
-    }
-
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
index 4988483..5994adc 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
@@ -20,13 +20,13 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 
 public class ADatePrinter implements IPrinter {
 
-    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
     public static final ADatePrinter INSTANCE = new ADatePrinter();
 
     @Override
@@ -36,10 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
-
-        ps.print("{ \"date\": ");
-        ps.print(chrononTime);
-        ps.print("}");
+        ps.print("\"");
+        PrintTools.printDateString(b, s, l, ps);
+        ps.print("\"");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
index 19d1270..6d98b8d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,10 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        ps.print("{ \"datetime\": ");
-        ps.print(chrononTime);
-        ps.print("}");
+        ps.print("\"");
+        PrintTools.printDateTimeString(b, s, l, ps);
+        ps.print("\"");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
index 3d7ea84..409586c 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,11 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        ps.print("{ \"day-time-duration\": ");
-        ps.print(milliseconds);
-        ps.print("}");
+        ps.print("\"");
+        PrintTools.printDayTimeDurationString(b, s, l, ps);
+        ps.print("\")");
     }
-
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
index 14ee58e..59874af 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -36,14 +37,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
-
-        ps.print("{ \"duration\": { ");
-        ps.print("\"months\": ");
-        ps.print(months);
-        ps.print(", \"millis\": ");
-        ps.print(milliseconds);
-        ps.print("} }");
+        ps.print("\"");
+        PrintTools.printDurationString(b, s, l, ps);
+        ps.print("\"");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
index 625494a..1ffceea 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,11 +36,9 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int time = AInt32SerializerDeserializer.getInt(b, s + 1);
-
-        ps.print("{ \"time\": ");
-        ps.print(time);
-        ps.print("}");
+        ps.print("\"");
+        PrintTools.printTimeString(b, s, l, ps);
+        ps.print("\"");
     }
 
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
index d7eb138..0cc8eb5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
@@ -20,13 +20,13 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 
 public class ADatePrinter implements IPrinter {
 
-    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
     public static final ADatePrinter INSTANCE = new ADatePrinter();
 
     @Override
@@ -36,10 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
-
-        ps.print("{ \"date\": ");
-        ps.print(chrononTime);
-        ps.print("}");
+        ps.print("{ \"date\": \"");
+        PrintTools.printDateString(b, s, l, ps);
+        ps.print("\" }");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
index 0705283..de9445e 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,10 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        ps.print("{ \"datetime\": ");
-        ps.print(chrononTime);
-        ps.print("}");
+        ps.print("{ \"datetime\": \"");
+        PrintTools.printDateTimeString(b, s, l, ps);
+        ps.print("\" }");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
index a00519a..3b29ba8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,10 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
-
         ps.print("{ \"day-time-duration\": ");
-        ps.print(milliseconds);
+        PrintTools.printDayTimeDurationString(b, s, l, ps);
         ps.print("}");
     }
 
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
index 315fd30..1642afa 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -36,14 +37,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
-
-        ps.print("{ \"duration\": { ");
-        ps.print("\"months\": ");
-        ps.print(months);
-        ps.print(", \"millis\": ");
-        ps.print(milliseconds);
-        ps.print("} }");
+        ps.print("{ \"duration\": \"");
+        PrintTools.printDurationString(b, s, l, ps);
+        ps.print("\" }");
     }
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
index cd5fcc0..59328c0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
@@ -20,6 +20,7 @@
 
 import java.io.PrintStream;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
@@ -35,11 +36,8 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int time = AInt32SerializerDeserializer.getInt(b, s + 1);
-
-        ps.print("{ \"time\": ");
-        ps.print(time);
-        ps.print("}");
+        ps.print("{ \"time\": \"");
+        PrintTools.printTimeString(b, s, l, ps);
+        ps.print("\" }");
     }
-
 }
