diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index 458a1db2655b78f4858365b845483d2652f22679..70d20bf59faedc46346e966faaf9c2c20887fad8 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -1767,10 +1767,10 @@ SubsamplesStatement::writeOutput(ostream &output, const string &basename) const
        it != subsample_declaration_map.end(); it++, map_indx++)
     output << "estimation_info.subsamples(subsamples_indx).range_index(" << map_indx << ") = {'"
            << it->first << "'};" << endl
-           << "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date1 = dynDate('"
-           << it->second.first << "');" << endl
-           << "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date2 = dynDate('"
-           << it->second.second << "');" << endl;
+           << "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date1 = "
+           << it->second.first << endl
+           << "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date2 = "
+           << it->second.second << endl;
 
   // Initialize associated subsample substructures in estimation_info
   const SymbolType symb_type = symbol_table.getType(name1);
diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy
index 856632730b0604292f0f6a7ff6bbc5c31b4b01f2..a53fa0d3b7f569d68905ad7292b6f64190d938a9 100644
--- a/preprocessor/DynareBison.yy
+++ b/preprocessor/DynareBison.yy
@@ -178,7 +178,7 @@ class ParsingDriver;
 
 %type <node_val> expression expression_or_empty
 %type <node_val> equation hand_side
-%type <string_val> non_negative_number signed_number signed_integer date_number
+%type <string_val> non_negative_number signed_number signed_integer
 %type <string_val> filename symbol vec_of_vec_value vec_value_list
 %type <string_val> vec_value_1 vec_value signed_inf signed_number_w_inf
 %type <string_val> range vec_value_w_inf vec_value_1_w_inf
@@ -1024,10 +1024,6 @@ non_negative_number : INT_NUMBER
                     | FLOAT_NUMBER
                     ;
 
-date_number : DATE_NUMBER
-            | INT_NUMBER
-            ;
-
 signed_number : PLUS non_negative_number
                { $$ = $2; }
               | MINUS non_negative_number
@@ -1243,7 +1239,7 @@ prior_pdf : BETA_PDF
             { $$ = eInvGamma2; }
           ;
 
-set_time : SET_TIME '(' date_number ')' ';'
+set_time : SET_TIME '(' DATE_NUMBER ')' ';'
            { driver.set_time($3); }
          ;
 
@@ -2295,10 +2291,10 @@ o_conditional_variance_decomposition : CONDITIONAL_VARIANCE_DECOMPOSITION EQUAL
                                        { driver.option_vec_int("conditional_variance_decomposition", $3); }
                                      ;
 o_first_obs : FIRST_OBS EQUAL INT_NUMBER { driver.option_num("first_obs", $3); };
-o_new_estimation_data_first_obs : FIRST_OBS EQUAL date_number
+o_new_estimation_data_first_obs : FIRST_OBS EQUAL DATE_NUMBER
                                   { driver.option_date("first_obs", $3); }
                                 ;
-o_last_obs : LAST_OBS EQUAL date_number
+o_last_obs : LAST_OBS EQUAL DATE_NUMBER
              { driver.option_date("last_obs", $3); }
            ;
 o_shift : SHIFT EQUAL signed_number { driver.option_num("shift", $3); };
@@ -2342,7 +2338,7 @@ list_allowed_graph_formats : allowed_graph_formats
                            | list_allowed_graph_formats COMMA allowed_graph_formats
                            ;
 
-o_subsample_name : symbol EQUAL date_number ':' date_number
+o_subsample_name : symbol EQUAL DATE_NUMBER ':' DATE_NUMBER
                    { driver.set_subsample_name_equal_to_date_range($1, $3, $5); }
                  ;
 o_conf_sig : CONF_SIG EQUAL non_negative_number { driver.option_num("conf_sig", $3); };
diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll
index ad894a6e334ac8d9a65d3f9474737b2479fc8000..c836be7f7887af68737d46851f312fa6a2320d52 100644
--- a/preprocessor/DynareFlex.ll
+++ b/preprocessor/DynareFlex.ll
@@ -690,7 +690,7 @@ string eofbuff;
   return token::INT_NUMBER;
 }
 
-<DYNARE_STATEMENT,DYNARE_BLOCK>-?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2])) {
+<DYNARE_STATEMENT,DYNARE_BLOCK>dates[[:space:]]*\([[:space:]]*\'[[:space:]]*-?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2]))[[:space:]]*\'[[:space:]]*\) {
   yylval->string_val = new string(yytext);
   return token::DATE_NUMBER;
 }
diff --git a/preprocessor/ParsingDriver.cc b/preprocessor/ParsingDriver.cc
index 38bf5a782eddfcd836857778db078fa212ce0bd9..31d5fbfa43b6a2143c015918a6008459945580b6 100644
--- a/preprocessor/ParsingDriver.cc
+++ b/preprocessor/ParsingDriver.cc
@@ -1226,10 +1226,7 @@ ParsingDriver::set_unit_root_vars()
 void
 ParsingDriver::set_time(string *arg)
 {
-  string arg1 = *arg;
-  for (size_t i=0; i<arg1.length(); i++)
-    arg1[i]= toupper(arg1[i]);
-  option_date("initial_period", arg1);
+  option_date("initial_period", arg);
   mod_file->addStatement(new SetTimeStatement(options_list));
   options_list.clear();
 }
diff --git a/preprocessor/Statement.cc b/preprocessor/Statement.cc
index 59021287bd1c15392f1a12e350170bd87b1f32e4..76b600b7bbe197bef095d917e7ec3b89b8644db1 100644
--- a/preprocessor/Statement.cc
+++ b/preprocessor/Statement.cc
@@ -94,7 +94,7 @@ OptionsList::writeOutput(ostream &output) const
 
   for (date_options_t::const_iterator it = date_options.begin();
        it != date_options.end(); it++)
-    output << "options_." << it->first << " = dynDate('" << it->second << "');" << endl;
+    output << "options_." << it->first << " = " << it->second << ";" << endl;
 
   for (symbol_list_options_t::const_iterator it = symbol_list_options.begin();
        it != symbol_list_options.end(); it++)
@@ -137,7 +137,7 @@ OptionsList::writeOutput(ostream &output, const string &option_group) const
 
   for (date_options_t::const_iterator it = date_options.begin();
        it != date_options.end(); it++)
-    output << option_group << "." << it->first << " = dynDate('" << it->second << "');" << endl;
+    output << option_group << "." << it->first << " = " << it->second << ";" << endl;
 
   for (symbol_list_options_t::const_iterator it = symbol_list_options.begin();
        it != symbol_list_options.end(); it++)