so far i've found 3 (what i think probably are) typos in the date_api_sql.inc file.

line 178 is:

$field = "STR_TO_DATE($field, '%Y-%m-%%dT%T')";

should be(?)

$field = "STR_TO_DATE($field, '%Y-%m-%d %T')";

line 178 is:

'd' => '%%d', 'j' => '%e',

should be(?)

'd' => '%d', 'j' => '%e',

line 178 is:

's' => '%%s',

should be(?)

's' => '%s',

am i correct in fixing those?
i know the first one (line 178) was stopping my '>=now()' from working correctly.
any ideas on this?

Comments

chadd’s picture

sorry, the second example is actually line 341 and the third example is 334

karens’s picture

Status: Active » Fixed

That is not a bug. The raw code has to look like that to make it through Drupal's processing, where the extra '%' gets stripped out.

chadd’s picture

Status: Needs review » Fixed

if it supposed to be stripped out by drupal, should it still be displaying with the double %% in the view query when i preview the view?
my query is displayed to me as:

DATE_FORMAT(STR_TO_DATE(node_data_field_thing_date.field_thing_date_value2, '%Y-%m-%%d %T'), '%Y-%m') >= '2009-05')) 
chadd’s picture

Status: Fixed » Needs review

what about the extra 'T' on line 178?

karens’s picture

The Views preview shows the query before it's processed. This code is correct.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.