diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index c9de1de91d7bf2105ec95cc9adbcad5aae2b6d99..12b3b4260bbc837d64c6a8f51e41915ee3977bba 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -664,6 +664,9 @@ class db extends mysqli
 		case 'blob':
 			return 'blob';
 			break;
+		case 'date':
+			return 'date';
+			break;
 		}
 	}
 
diff --git a/interface/lib/classes/tform_tpl_generator.inc.php b/interface/lib/classes/tform_tpl_generator.inc.php
index 635aa0467b6c1408b404fd7ceae6fc5697cf4e24..a2da27606e1f5ab1a78f177ffcbe648448c59336 100644
--- a/interface/lib/classes/tform_tpl_generator.inc.php
+++ b/interface/lib/classes/tform_tpl_generator.inc.php
@@ -271,9 +271,9 @@ class tform_tpl_generator {
 						$defaultValue = 'NULL';
 						break;
 					case 'DATE':
-						$type = 'int64';
+						$type = 'date';
 						$typevalue = '';
-						$defaultValue = ($field["default"] != '')?$field["default"]:'0';
+						$defaultValue = ($field["default"] != '')?$field["default"]:'0000-00-00';
 						break;
 					}