I have a table in MySQL with two datetime columns
EndDate. I have a script where I gather the data, covert to PyDataSet, then iterate and find a match from another PyDataSet. On occasion, some of the values don’t come back as a match (typically in a set of 200, 1 or 2 will not match), but they should. Code snippet
for sqlRow in SQL: for dsRow in DS: if dsRow ['StartDate'] == sqlRow ['StartDate']:
If I use
system.date.parse, as follows, it will work
for sqlRow in SQL: for dsRow in DS: if system.date.parse(dsRow ['StartDate']) == system.date.parse(sqlRow ['StartDate']):
What am I missing on this. When I print the dates off, not using
system.data.parse, they look equal to me. The issue seems to be close to the hour boundary (bottom of the hour within a few minutes), not sure what that has to do with anything.
system.date.parse should parse a string to date, but these are dates. Thanks for the help.