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 44fcf7c..d5d703d 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
@@ -86,8 +86,17 @@
 
                                 int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
 
-                                charAccessor.reset(serString, 3, stringLength);
-                                long chrononTimeInMs = ADateParserFactory.parseDatePart(charAccessor, true);
+                                int startOffset = 3;
+                                while (serString[startOffset] == ' ') {
+                                    startOffset++;
+                                }
+                                int endOffset = stringLength - 1 + 3;
+                                while (serString[endOffset] == ' ') {
+                                    endOffset--;
+                                }
+
+                                charAccessor.reset(serString, startOffset, endOffset - startOffset + 1);
+                                long chrononTimeInMs = ADateParserFactory.parseDatePart(charAccessor);
 
                                 short temp = 0;
                                 if (chrononTimeInMs < 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 6a5783b..104dc32 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
@@ -85,23 +85,39 @@
 
                                 int stringLength = (serString[1] & 0xff << 8) + (serString[2] & 0xff << 0);
 
-                                charAccessor.reset(serString, 3, stringLength);
+                                int startOffset = 3;
+                                int endOffset = stringLength - 1 + 3;
+
+                                // skip leading space
+                                while (serString[startOffset] == ' ') {
+                                    startOffset++;
+                                }
+
+                                // skip tailing space
+                                while (serString[endOffset] == ' ') {
+                                    endOffset--;
+                                }
+
+                                charAccessor.reset(serString, startOffset, endOffset - startOffset + 1);
 
                                 // +1 if it is negative (-)
                                 short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
-                                if (charAccessor.getCharAt(timeOffset + 10) != 'T'
-                                        && charAccessor.getCharAt(timeOffset + 8) != 'T') {
-                                    throw new AlgebricksException(errorMessage + ": missing T");
+                                timeOffset += 8;
+
+                                if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                    timeOffset += 2;
+                                    if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                        throw new AlgebricksException(errorMessage + ": missing T");
+                                    }
                                 }
 
-                                // if extended form 11, else 9
-                                timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
-                                        : (short) (9);
+                                charAccessor.reset(serString, startOffset, timeOffset);
 
-                                long chrononTimeInMs = ADateParserFactory.parseDatePart(charAccessor, false);
+                                long chrononTimeInMs = ADateParserFactory.parseDatePart(charAccessor);
 
-                                charAccessor.reset(serString, 3 + timeOffset, stringLength - timeOffset);
+                                charAccessor.reset(serString, startOffset + timeOffset + 1, endOffset
+                                        - (startOffset + timeOffset + 1) + 1);
 
                                 chrononTimeInMs += ATimeParserFactory.parseTimePart(charAccessor);
 
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 e1a12f8..3ac64f3 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
@@ -101,15 +101,15 @@
 
                                 // start date
                                 charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
-                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor, true)
+                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor)
                                         / GregorianCalendarSystem.CHRONON_OF_DAY;
-                                // end date
 
+                                // end date
                                 stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
                                         + (argOut1.getByteArray()[2] & 0xff << 0);
 
                                 charAccessor.reset(argOut1.getByteArray(), 3, stringLength);
-                                long intervalEnd = ADateParserFactory.parseDatePart(charAccessor, true)
+                                long intervalEnd = ADateParserFactory.parseDatePart(charAccessor)
                                         / GregorianCalendarSystem.CHRONON_OF_DAY;
 
                                 if (intervalEnd < intervalStart) {
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 72a8e37..35d1a02 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,46 +95,46 @@
                                 nullSerde.serialize(ANull.NULL, out);
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
-                                // start date
-
+                                // start datetime
                                 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);
-
-                                if (charAccessor.getCharAt(timeOffset + 10) != 'T'
-                                        && charAccessor.getCharAt(timeOffset + 8) != 'T') {
-                                    throw new AlgebricksException(errorMessage + ": missing T");
+                                timeOffset += 8;
+                                if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                    timeOffset += 2;
+                                    if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                        throw new AlgebricksException(errorMessage + ": missing T");
+                                    }
                                 }
 
-                                // if extended form 11, else 9
-                                timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
-                                        : (short) (9);
-                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
+                                charAccessor.reset(argOut0.getByteArray(), 3, timeOffset);
+                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor);
+                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset + 1, stringLength
+                                        - timeOffset - 1);
                                 intervalStart += ATimeParserFactory.parseTimePart(charAccessor);
 
-                                // end date
-
+                                // end datetime
                                 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);
-
-                                if (charAccessor.getCharAt(timeOffset + 10) != 'T'
-                                        && charAccessor.getCharAt(timeOffset + 8) != 'T') {
-                                    throw new AlgebricksException(errorMessage + ": missing T");
+                                timeOffset += 8;
+                                if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                    timeOffset += 2;
+                                    if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                        throw new AlgebricksException(errorMessage + ": missing T");
+                                    }
                                 }
 
-                                // if extended form 11, else 9
-                                timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
-                                        : (short) (9);
-                                long intervalEnd = ADateParserFactory.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut1.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
+                                charAccessor.reset(argOut1.getByteArray(), 3, timeOffset);
+                                long intervalEnd = ADateParserFactory.parseDatePart(charAccessor);
+                                charAccessor.reset(argOut1.getByteArray(), 3 + timeOffset + 1, stringLength
+                                        - timeOffset - 1);
                                 intervalEnd += ATimeParserFactory.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 3ce722a..73080c8 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,7 +96,6 @@
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
                                 // start date
-
                                 int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
                                         + (argOut0.getByteArray()[2] & 0xff << 0);
 
@@ -107,7 +106,6 @@
                                 }
 
                                 // end date
-
                                 stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
                                         + (argOut1.getByteArray()[2] & 0xff << 0);
 
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 23fdb07..6429daa 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
@@ -99,15 +99,15 @@
                                 nullSerde.serialize(ANull.NULL, out);
                             } else if (argOut0.getByteArray()[0] == SER_STRING_TYPE_TAG
                                     && argOut1.getByteArray()[0] == SER_STRING_TYPE_TAG) {
-                                // start date
 
+                                // start date
                                 int stringLength = (argOut0.getByteArray()[1] & 0xff << 8)
                                         + (argOut0.getByteArray()[2] & 0xff << 0);
 
                                 charAccessor.reset(argOut0.getByteArray(), 3, stringLength);
-                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor, true);
-                                // duration
+                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor);
 
+                                // duration
                                 stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
                                         + (argOut1.getByteArray()[2] & 0xff << 0);
 
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 91c45df..92469f0 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
@@ -108,20 +108,20 @@
                                 // get offset for time part: +1 if it is negative (-)
                                 short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
-                                if (charAccessor.getCharAt(timeOffset + 10) != 'T'
-                                        && charAccessor.getCharAt(timeOffset + 8) != 'T') {
-                                    throw new AlgebricksException(errorMessage + ": missing T");
+                                timeOffset += 8;
+
+                                if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                    timeOffset += 2;
+                                    if (charAccessor.getCharAt(timeOffset) != 'T') {
+                                        throw new AlgebricksException(errorMessage + ": missing T");
+                                    }
                                 }
 
-                                // if extended form 11, else 9
-                                timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
-                                        : (short) (9);
-                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor, false);
-                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset, stringLength - timeOffset);
+                                long intervalStart = ADateParserFactory.parseDatePart(charAccessor);
+                                charAccessor.reset(argOut0.getByteArray(), 3 + timeOffset + 1, stringLength - timeOffset - 1);
                                 intervalStart += ATimeParserFactory.parseTimePart(charAccessor);
 
                                 // duration
-
                                 stringLength = (argOut1.getByteArray()[1] & 0xff << 8)
                                         + (argOut1.getByteArray()[2] & 0xff << 0);
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/ADMDataParser.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/ADMDataParser.java
index 2e64ad4..b32110b 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/ADMDataParser.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/ADMDataParser.java
@@ -234,7 +234,7 @@
                 try {
                     if (checkType(ATypeTag.INTERVAL, objectType, out)) {
                         if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_OPEN) {
-                            if (admLexer.next() == AdmLexer.TOKEN_STRING_CONS) {
+                            if (admLexer.next() == AdmLexer.TOKEN_STRING_LITERAL) {
                                 AIntervalSerializerDeserializer.parseDate(admLexer.getLastTokenImage(), out);
 
                                 if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_CLOSE) {
@@ -252,7 +252,7 @@
                 try {
                     if (checkType(ATypeTag.INTERVAL, objectType, out)) {
                         if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_OPEN) {
-                            if (admLexer.next() == AdmLexer.TOKEN_STRING_CONS) {
+                            if (admLexer.next() == AdmLexer.TOKEN_STRING_LITERAL) {
                                 AIntervalSerializerDeserializer.parseTime(admLexer.getLastTokenImage(), out);
 
                                 if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_CLOSE) {
@@ -270,7 +270,7 @@
                 try {
                     if (checkType(ATypeTag.INTERVAL, objectType, out)) {
                         if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_OPEN) {
-                            if (admLexer.next() == AdmLexer.TOKEN_STRING_CONS) {
+                            if (admLexer.next() == AdmLexer.TOKEN_STRING_LITERAL) {
                                 AIntervalSerializerDeserializer.parseDatetime(admLexer.getLastTokenImage(), out);
 
                                 if (admLexer.next() == AdmLexer.TOKEN_CONSTRUCTOR_CLOSE) {
diff --git a/asterix-runtime/src/main/resources/adm.grammar b/asterix-runtime/src/main/resources/adm.grammar
index 56c7212..4d4158f 100644
--- a/asterix-runtime/src/main/resources/adm.grammar
+++ b/asterix-runtime/src/main/resources/adm.grammar
@@ -26,9 +26,9 @@
 RECTANGLE_CONS = string(rectangle)
 CIRCLE_CONS    = string(circle)
 TIME_CONS      = string(time)
-INTERVAL_TIME_CONS      = string(interval_time)
-INTERVAL_DATE_CONS      = string(interval_date)
-INTERVAL_DATETIME_CONS  = string(interval_datetime)
+INTERVAL_TIME_CONS      = string(interval-time)
+INTERVAL_DATE_CONS      = string(interval-date)
+INTERVAL_DATETIME_CONS  = string(interval-datetime)
 
 NULL_LITERAL   = string(null)
 TRUE_LITERAL   = string(true)
