diff --git a/asterix-app/data/temporal/temporalData.json b/asterix-app/data/temporal/temporalData.json
index ae100f7..b866a51 100644
--- a/asterix-app/data/temporal/temporalData.json
+++ b/asterix-app/data/temporal/temporalData.json
@@ -1,2 +1,3 @@
-{"id": "001", "dateField": -2012-12-12, "dateFieldPlus": 0990-01-01, "timeField": 23:49:12.39Z, "timeFieldPlus": 03:23:12.2, "datetimeField": 2012-12-12T00:00:00.001, "datetimeFieldPlus": -00130810T221015398, "durationField": P20Y19DT3H74M23.34S, "durationFieldPlus": -P2MT4M300.68S}
-{"id": "002", "datetimeField": 19201220T232918478 }
\ No newline at end of file
+{"id": "001", "dateField": -2012-12-12, "dateFieldPlus": 0990-01-01, "timeField": 23:49:12.39Z, "timeFieldPlus": 03:23:12.2, "datetimeField": 2012-12-12T00:00:00.001, "datetimeFieldPlus": -00130810T221015398, "durationField": P20Y19DT3H74M23.34S, "durationFieldPlus": -P2MT4M300.68S, "intervalField": I(2012-12-12T00:00:00.001,20130810T221015398) }
+{"id": "002", "datetimeField": 19201220T232918478 }
+{"id": "003", "intervalPlus": I(19:23:32.328Z,23:20:20) }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds.aql
index c816047..5813696 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds.aql
@@ -13,7 +13,8 @@
   dateField: date?,
   timeField: time?,
   datetimeField: datetime?,
-  durationField: duration?
+  durationField: duration?,
+  intervalField: interval?
 }
 
 write output to nc1:"rttest/temp_insert_from_ext_ds.adm";
@@ -23,4 +24,4 @@
 (("path"="nc1://data/temporal/temporalData.json"),("format"="adm"));
 
 for $r in dataset("testds") 
-return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField}
\ No newline at end of file
+return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField, "interval": $r.intervalField }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds.adm b/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds.adm
index 00bfc1b..afe2ccc 100644
--- a/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds.adm
+++ b/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds.adm
@@ -1,2 +1,3 @@
-{ "date": date("-2012-12-12"), "time": time("23:49:12.390Z"), "datetime": datetime("2012-12-12T00:00:00.001Z"), "duration": duration("P20Y19DT4H14M23.34S") }
-{ "date": null, "time": null, "datetime": datetime("1920-12-20T23:29:18.478Z"), "duration": null }
\ No newline at end of file
+{ "date": date("-2012-12-12"), "time": time("23:49:12.390Z"), "datetime": datetime("2012-12-12T00:00:00.001Z"), "duration": duration("P20Y19DT4H14M23.34S"), "interval": interval("datetime("2012-12-12T00:00:00.001Z"), datetime("2013-08-10T22:10:15.398Z")") }
+{ "date": null, "time": null, "datetime": datetime("1920-12-20T23:29:18.478Z"), "duration": null, "interval": null }
+{ "date": null, "time": null, "datetime": null, "duration": null, "interval": null }
\ No newline at end of file
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entities/AsterixBuiltinTypeMap.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entities/AsterixBuiltinTypeMap.java
index 734237e..27cf542 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entities/AsterixBuiltinTypeMap.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entities/AsterixBuiltinTypeMap.java
@@ -40,6 +40,7 @@
         _builtinTypeMap.put("time", BuiltinType.ATIME);
         _builtinTypeMap.put("datetime", BuiltinType.ADATETIME);
         _builtinTypeMap.put("duration", BuiltinType.ADURATION);
+        _builtinTypeMap.put("interval", BuiltinType.AINTERVAL);
         _builtinTypeMap.put("point", BuiltinType.APOINT);
         _builtinTypeMap.put("point3d", BuiltinType.APOINT3D);
         _builtinTypeMap.put("line", BuiltinType.ALINE);
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
index 70ba225..91c4587 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
@@ -64,7 +64,7 @@
         long chrononTimeInMs = 0;
         try {
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
-            charAccessor.reset(date, 0);
+            charAccessor.reset(date, 0, date.length());
             chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, true);
         } catch (Exception e) {
             throw new HyracksDataException(e);
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
index 3f652c2..4a40198 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
@@ -66,7 +66,7 @@
         long chrononTimeInMs = 0;
         try {
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
-            charAccessor.reset(datetime, 0);
+            charAccessor.reset(datetime, 0, datetime.length());
 
             // +1 if it is negative (-)
             short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
@@ -80,7 +80,7 @@
 
             chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, false);
 
-            charAccessor.reset(datetime, timeOffset);
+            charAccessor.reset(datetime, timeOffset, datetime.length() - timeOffset);
 
             chrononTimeInMs += ADateAndTimeParser.parseTimePart(charAccessor);
         } catch (Exception e) {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
index 2aa68a2..5390abe 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
@@ -48,7 +48,7 @@
         try {
             AMutableDuration aDuration = new AMutableDuration(0, 0);
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
-            charAccessor.reset(duration, 0);
+            charAccessor.reset(duration, 0, duration.length());
             ADurationParser.parse(charAccessor, aDuration);
 
             durationSerde.serialize(aDuration, out);
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/AIntervalSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/AIntervalSerializerDeserializer.java
index 3fb4fa8..61d17c1 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/AIntervalSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/AIntervalSerializerDeserializer.java
@@ -78,6 +78,13 @@
         return data[offset + 8 * 2];
     }
 
+    /**
+     * create an interval value from two given datetime instance.
+     * 
+     * @param interval
+     * @param out
+     * @throws HyracksDataException
+     */
     public static void parseDatetime(String interval, DataOutput out) throws HyracksDataException {
         AMutableInterval aInterval = new AMutableInterval(0l, 0l, (byte) 0);
 
@@ -87,8 +94,19 @@
 
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
 
-            //Interval Start
-            charAccessor.reset(interval, 0);
+            // Get the index for the comma
+            int commaIndex = interval.indexOf(',');
+            if (commaIndex < 0) {
+                throw new AlgebricksException("comma is missing for a string of interval");
+            }
+
+            int nonSpaceIndex = commaIndex - 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex--;
+            }
+
+            // Interval Start
+            charAccessor.reset(interval, 0, nonSpaceIndex + 1);
 
             // +1 if it is negative (-)
             short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
@@ -102,33 +120,17 @@
 
             chrononTimeInMsStart = ADateAndTimeParser.parseDatePart(charAccessor, false);
 
-            charAccessor.reset(interval, timeOffset);
+            charAccessor.reset(interval, timeOffset, nonSpaceIndex - timeOffset + 1);
 
             chrononTimeInMsStart += ADateAndTimeParser.parseTimePart(charAccessor);
 
-            //Interval End
-            charAccessor.reset(interval, 0);
-
-            // Find the comma in the expression
-            int commaSkipIndex = 0;
-            int length = charAccessor.getLength();
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ','; commaSkipIndex++) {
+            // Interval End
+            nonSpaceIndex = commaIndex + 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex++;
             }
 
-            if (length <= commaSkipIndex) {
-                throw new AlgebricksException(errorMessage + ": comma is missing");
-            }
-            commaSkipIndex++;
-
-            // Skip any possible spaces (' ')
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ' '; commaSkipIndex++) {
-            }
-
-            if (length <= commaSkipIndex) {
-                // TODO: Maybe remove this error and combine with the previous one
-                throw new AlgebricksException(errorMessage + ": error while skipping spaces");
-            }
-            charAccessor.reset(interval, commaSkipIndex);
+            charAccessor.reset(interval, nonSpaceIndex, interval.length() - nonSpaceIndex);
 
             // +1 if it is negative (-)
             timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
@@ -142,7 +144,7 @@
 
             chrononTimeInMsEnd = ADateAndTimeParser.parseDatePart(charAccessor, false);
 
-            charAccessor.reset(interval, commaSkipIndex + timeOffset);
+            charAccessor.reset(interval, nonSpaceIndex + timeOffset, interval.length() - nonSpaceIndex - timeOffset);
 
             chrononTimeInMsEnd += ADateAndTimeParser.parseTimePart(charAccessor);
 
@@ -164,34 +166,32 @@
 
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
 
-            //Interval Start
-            charAccessor.reset(interval, 0);
+            // Get the index for the comma
+            int commaIndex = interval.indexOf(',');
+            if (commaIndex < 0) {
+                throw new AlgebricksException("comma is missing for a string of interval");
+            }
+
+            int nonSpaceIndex = commaIndex - 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex--;
+            }
+
+            // Interval Start
+            charAccessor.reset(interval, 0, nonSpaceIndex + 1);
             chrononTimeInMsStart = ADateAndTimeParser.parseTimePart(charAccessor);
 
             if (chrononTimeInMsStart < 0) {
                 chrononTimeInMsStart += GregorianCalendarSystem.CHRONON_OF_DAY;
             }
 
-            //Interval End
-            int commaSkipIndex = 0;
-            int length = charAccessor.getLength();
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ','; commaSkipIndex++) {
+            // Interval End
+            nonSpaceIndex = commaIndex + 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex++;
             }
 
-            if (length <= commaSkipIndex) {
-                throw new AlgebricksException(errorMessage + ": comma is missing");
-            }
-            commaSkipIndex++;
-
-            // Skip any possible spaces (' ')
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ' '; commaSkipIndex++) {
-            }
-
-            if (length <= commaSkipIndex) {
-                // TODO: Maybe remove this error and combine with the previous one
-                throw new AlgebricksException(errorMessage + ": error while skipping spaces");
-            }
-            charAccessor.reset(interval, commaSkipIndex);
+            charAccessor.reset(interval, nonSpaceIndex, interval.length() - nonSpaceIndex);
             chrononTimeInMsEnd = ADateAndTimeParser.parseTimePart(charAccessor);
 
             if (chrononTimeInMsEnd < 0) {
@@ -216,8 +216,19 @@
         try {
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
 
-            //Interval Start
-            charAccessor.reset(interval, 0);
+            // Get the index for the comma
+            int commaIndex = interval.indexOf(',');
+            if (commaIndex < 0) {
+                throw new AlgebricksException("comma is missing for a string of interval");
+            }
+
+            int nonSpaceIndex = commaIndex - 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex--;
+            }
+
+            // Interval Start
+            charAccessor.reset(interval, 0, nonSpaceIndex + 1);
 
             chrononTimeInMsStart = ADateAndTimeParser.parseDatePart(charAccessor, true);
 
@@ -225,26 +236,13 @@
                 tempStart = 1;
             }
 
-            //Interval End
-            int commaSkipIndex = 0;
-            int length = charAccessor.getLength();
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ','; commaSkipIndex++) {
+            // Interval End
+            nonSpaceIndex = commaIndex + 1;
+            while (interval.charAt(nonSpaceIndex) == ' ') {
+                nonSpaceIndex++;
             }
 
-            if (length <= commaSkipIndex) {
-                throw new AlgebricksException(errorMessage + ": comma is missing");
-            }
-            commaSkipIndex++;
-
-            // Skip any possible spaces (' ')
-            for (; length > commaSkipIndex && charAccessor.getCharAt(commaSkipIndex) != ' '; commaSkipIndex++) {
-            }
-
-            if (length <= commaSkipIndex) {
-                // TODO: Maybe remove this error and combine with the previous one
-                throw new AlgebricksException(errorMessage + ": error while skipping spaces");
-            }
-            charAccessor.reset(interval, commaSkipIndex);
+            charAccessor.reset(interval, nonSpaceIndex, interval.length() - nonSpaceIndex);
 
             chrononTimeInMsEnd = ADateAndTimeParser.parseDatePart(charAccessor, true);
 
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
index c640e80..92f32b8 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
@@ -52,7 +52,7 @@
 
         try {
             StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
-            charAccessor.reset(time, 0);
+            charAccessor.reset(time, 0, time.length());
             chrononTimeInMs = ADateAndTimeParser.parseTimePart(charAccessor);
         } catch (Exception e) {
             throw new HyracksDataException(e);
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java
index 50d4d1a..453c86f 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java
@@ -14,15 +14,20 @@
  */
 package edu.uci.ics.asterix.om.base.temporal;
 
+import edu.uci.ics.asterix.common.exceptions.AsterixRuntimeException;
+
 public class ByteArrayCharSequenceAccessor implements ICharSequenceAccessor<Byte[]> {
 
-    private byte[] string;
+    private byte[] buf;
     private int offset;
-    private int beginOffset;
+    private int length;
 
     @Override
-    public char getCharAt(int index) {
-        return (char) (string[index + offset + beginOffset]);
+    public char getCharAt(int index) throws AsterixRuntimeException {
+        if (index < 0 || index >= length) {
+            throw new AsterixRuntimeException("Byte array char accessor is out of bound: " + index + ":" + length);
+        }
+        return (char) (buf[index + offset]);
     }
 
     /**
@@ -35,15 +40,15 @@
      * @param offset
      *            The offset of the substring of the string stored (offset from the beginOffset).
      */
-    public void reset(byte[] obj, int beginOffset, int offset) {
-        string = obj;
+    public void reset(byte[] obj, int offset, int length) {
+        this.buf = obj;
         this.offset = offset;
-        this.beginOffset = beginOffset;
+        this.length = length;
     }
 
     @Override
     public int getLength() {
-        return ((string[beginOffset - 2] & 0xff) << 8) + ((string[beginOffset - 1] & 0xff) << 0) - offset;
+        return length;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java
index c475523..d5a99a0 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java
@@ -14,6 +14,8 @@
  */
 package edu.uci.ics.asterix.om.base.temporal;
 
+import edu.uci.ics.asterix.common.exceptions.AsterixRuntimeException;
+
 public interface ICharSequenceAccessor<T> {
 
     /**
@@ -22,7 +24,7 @@
      * @param index
      * @return
      */
-    public char getCharAt(int index);
+    public char getCharAt(int index) throws AsterixRuntimeException;
 
     /**
      * Get the length of the wrapped char sequence.
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java
index 6c02340..17e483a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java
@@ -14,24 +14,31 @@
  */
 package edu.uci.ics.asterix.om.base.temporal;
 
+import edu.uci.ics.asterix.common.exceptions.AsterixRuntimeException;
+
 public class StringCharSequenceAccessor implements ICharSequenceAccessor<String> {
 
     private String string;
     private int offset;
+    private int length;
 
     @Override
-    public char getCharAt(int index) {
+    public char getCharAt(int index) throws AsterixRuntimeException {
+        if (index >= length) {
+            throw new AsterixRuntimeException("String accessor is out of bound.");
+        }
         return string.charAt(index + offset);
     }
 
-    public void reset(String obj, int offset) {
-        string = obj;
+    public void reset(String obj, int offset, int len) {
+        this.string = obj;
         this.offset = offset;
+        this.length = len;
     }
 
     @Override
     public int getLength() {
-        return string.length() - offset;
+        return length;
     }
 
 }
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
index 19c9d94..d6e3303 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
@@ -85,7 +85,9 @@
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
 
-                                charAccessor.reset(serString, 3, 0);
+                                int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
+
+                                charAccessor.reset(serString, 3, stringLength);
                                 long chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, true);
 
                                 short temp = 0;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
index 93ad162..abbe033 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
@@ -82,7 +82,10 @@
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
-                                charAccessor.reset(serString, 3, 0);
+
+                                int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
+
+                                charAccessor.reset(serString, 3, stringLength);
 
                                 // +1 if it is negative (-)
                                 short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
@@ -98,7 +101,7 @@
 
                                 long chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, false);
 
-                                charAccessor.reset(serString, 3, timeOffset);
+                                charAccessor.reset(serString, 3 + timeOffset, stringLength - timeOffset);
 
                                 chrononTimeInMs += ADateAndTimeParser.parseTimePart(charAccessor);
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
index 977bee1..93c6c15 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
@@ -84,7 +84,9 @@
 
                             if (serString[0] == SER_STRING_TYPE_TAG) {
 
-                                charAccessor.reset(serString, 3, 0);
+                                int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
+
+                                charAccessor.reset(serString, 3, stringLength);
 
                                 ADurationParser.parse(charAccessor, aDuration);
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
index dcba2e0..d98b1bc 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
@@ -95,12 +95,20 @@
                                 nullSerde.serialize(ANull.NULL, out);
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
                                 // start date
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 long intervalStart = ADateAndTimeParser.parseDatePart(charAccessor, true)
                                         / GregorianCalendarSystem.CHRONON_OF_DAY;
                                 // end date
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 long intervalEnd = ADateAndTimeParser.parseDatePart(charAccessor, true)
                                         / GregorianCalendarSystem.CHRONON_OF_DAY;
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
index b8c6a72..dbc14ea 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
@@ -95,7 +95,11 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start date
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 // get offset for time part: +1 if it is negative (-)
                                 short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
@@ -108,11 +112,15 @@
                                 timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
                                         : (short) (9);
                                 long intervalStart = ADateAndTimeParser.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut0.getByteArray(), 3, timeOffset);
+                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
                                 intervalStart += ADateAndTimeParser.parseTimePart(charAccessor);
 
                                 // end date
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 // get offset for time part: +1 if it is negative (-)
                                 timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
@@ -125,7 +133,7 @@
                                 timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
                                         : (short) (9);
                                 long intervalEnd = ADateAndTimeParser.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut1.getByteArray(), 3, timeOffset);
+                                charAccessor.reset(argOut1.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
                                 intervalEnd += ADateAndTimeParser.parseTimePart(charAccessor);
 
                                 if (intervalEnd < intervalStart) {
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
index dfa97c3..36fed9a 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
@@ -96,14 +96,22 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start date
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 long intervalStart = ADateAndTimeParser.parseTimePart(charAccessor);
                                 if (intervalStart < 0) {
                                     intervalStart += GregorianCalendarSystem.CHRONON_OF_DAY;
                                 }
 
                                 // end date
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 long intervalEnd = ADateAndTimeParser.parseTimePart(charAccessor);
                                 if (intervalEnd < 0) {
                                     intervalEnd += GregorianCalendarSystem.CHRONON_OF_DAY;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
index 50fab30..806fca6 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
@@ -100,10 +100,18 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start date
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 long intervalStart = ADateAndTimeParser.parseDatePart(charAccessor, true);
                                 // duration
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 ADurationParser.parse(charAccessor, aDuration);
 
                                 long intervalEnd = DurationArithmeticOperations.addDuration(intervalStart,
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
index 940cead..79e68a2 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
@@ -99,7 +99,11 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start date
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 // get offset for time part: +1 if it is negative (-)
                                 short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
@@ -112,11 +116,15 @@
                                 timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
                                         : (short) (9);
                                 long intervalStart = ADateAndTimeParser.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut0.getByteArray(), 3, timeOffset);
+                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
                                 intervalStart += ADateAndTimeParser.parseTimePart(charAccessor);
 
                                 // duration
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 ADurationParser.parse(charAccessor, aDuration);
 
                                 long intervalEnd = DurationArithmeticOperations.addDuration(intervalStart,
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
index 09b3b7b..3bdf15e 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
@@ -100,7 +100,11 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start time
-                                charAccessor.reset(argOut0.getByteArray(), 3, 0);
+
+                                int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                        + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
                                 int intervalStart = ADateAndTimeParser.parseTimePart(charAccessor);
 
                                 if (intervalStart < 0) {
@@ -108,7 +112,11 @@
                                 }
 
                                 // duration
-                                charAccessor.reset(argOut1.getByteArray(), 3, 0);
+
+                                stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                        + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                                charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
                                 ADurationParser.parse(charAccessor, aDuration);
 
                                 if (aDuration.getMonths() != 0) {
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
index b60ac60..0e5fe8d 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
@@ -84,7 +84,10 @@
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
-                                charAccessor.reset(serString, 3, 0);
+
+                                int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
+
+                                charAccessor.reset(serString, 3, stringLength);
                                 int chrononTimeInMs = ADateAndTimeParser.parseTimePart(charAccessor);
 
                                 if (chrononTimeInMs < 0) {
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
index 72b3baa..5449af2 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
@@ -112,7 +112,10 @@
                                                 + argOut1.getByteArray()[0]);
                             }
 
-                            charAccessor.reset(argOut1.getByteArray(), 3, 0);
+                            int stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
+                                    + (argOut1.getByteArray()[2] & 0xff << 0);
+
+                            charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
 
                             int timezone = ADateAndTimeParser.parseTimezonePart(charAccessor, 0);
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
index 29fbe65..1c6e838 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
@@ -112,7 +112,10 @@
                                                 + argOut1.getByteArray()[0]);
                             }
 
-                            charAccessor.reset(argOut1.getByteArray(), 3, 0);
+                            int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
+                                    + (argOut0.getByteArray()[2] & 0xff << 0);
+
+                            charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
 
                             int timezone = ADateAndTimeParser.parseTimezonePart(charAccessor, 0);
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
index d7714dc..3093c98 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
@@ -24,6 +24,7 @@
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADateSerializerDeserializer;
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
+import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ALineSerializerDeserializer;
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.APoint3DSerializerDeserializer;
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.APointSerializerDeserializer;
@@ -322,6 +323,22 @@
                         parseDuration(token.image, out);
                         break;
                     }
+                    case AdmLexerConstants.INTERVAL_CONS: {
+                        parseConstructor(ATypeTag.INTERVAL, objectType, out);
+                        break;
+                    }
+                    case AdmLexerConstants.TIME_INTERVAL_LITERAL: {
+                        parseTimeInterval(token.image.substring(2, token.image.length() - 1), out);
+                        break;
+                    }
+                    case AdmLexerConstants.DATE_INTERVAL_LITERAL: {
+                        parseDateInterval(token.image.substring(2, token.image.length() - 1), out);
+                        break;
+                    }
+                    case AdmLexerConstants.DATETIME_INTERVAL_LITERAL: {
+                        parseDatetimeInterval(token.image.substring(2, token.image.length() - 1), out);
+                        break;
+                    }
                     case AdmLexerConstants.POINT_CONS: {
                         parseConstructor(ATypeTag.POINT, objectType, out);
                         break;
@@ -689,7 +706,30 @@
                 } catch (HyracksDataException e) {
                     throw new AsterixException(e);
                 }
+            }
 
+            private void parseTimeInterval(String timeInterval, DataOutput out) throws AsterixException {
+                try {
+                    AIntervalSerializerDeserializer.parseTime(timeInterval, out);
+                } catch (HyracksDataException e) {
+                    throw new AsterixException(e);
+                }
+            }
+
+            private void parseDateInterval(String dateInterval, DataOutput out) throws AsterixException {
+                try {
+                    AIntervalSerializerDeserializer.parseDate(dateInterval, out);
+                } catch (HyracksDataException e) {
+                    throw new AsterixException(e);
+                }
+            }
+
+            private void parseDatetimeInterval(String datetimeInterval, DataOutput out) throws AsterixException {
+                try {
+                    AIntervalSerializerDeserializer.parseDatetime(datetimeInterval, out);
+                } catch (HyracksDataException e) {
+                    throw new AsterixException(e);
+                }
             }
 
             private IAType getComplexType(IAType aObjectType, ATypeTag tag) {
diff --git a/asterix-runtime/src/main/javacc/nontagged/AdmLexer.jj b/asterix-runtime/src/main/javacc/nontagged/AdmLexer.jj
index 9d9f3ff..b52f346 100644
--- a/asterix-runtime/src/main/javacc/nontagged/AdmLexer.jj
+++ b/asterix-runtime/src/main/javacc/nontagged/AdmLexer.jj
@@ -197,6 +197,28 @@
 
 <DEFAULT>
 TOKEN :
+{	<INTERVAL_CONS : ("interval")>
+}
+
+<DEFAULT>
+TOKEN :
+{	<DATE_INTERVAL_LITERAL : ("I") "(" <DATE_LITERAL> "," <DATE_LITERAL> ")" >
+}
+
+<DEFAULT>
+TOKEN :
+{
+	<TIME_INTERVAL_LITERAL : ("I") "(" <TIME_LITERAL> "," <TIME_LITERAL> ")" >
+}
+
+<DEFAULT>
+TOKEN :
+{
+	<DATETIME_INTERVAL_LITERAL : ("I") "(" <DATETIME_LITERAL> "," <DATETIME_LITERAL> ")" >
+}
+
+<DEFAULT>
+TOKEN :
 {
 	<#DIGIT : ["0" - "9"]>
 }
