|
|
|
|
|
by ineedasername
1589 days ago
|
|
I deal with this on a regular basis, and my approach is straightforward: I don't compare them. If a have a date on one side and date-time on the other, then I am missing the data necessary to make a comparison. The question seems like a non-sequitur because the implied question is "how do you compare two variable when one of them does not have the data needed for comparison" The only question in circumstance like this is whether or not my requirements allow for-- or can reasonably be modified-- to strip off time and only compare dates. If time is an inherent requirement to the project then the response I give is simple: "Then begin collecting time data." |
|
If you want to ask "Does a given date contain a time?", you find the start and end of that date in the relevant timezone and check if the time value falls in that range.