I've googled this and plenty about this in the web but I am not sure why my string is not converting to datetime.
ON i.ITEM_NUM = gi.ITEM_NUM
Is that the only row in the table?
If not, it's quite likely there is at least one non-date string value stored in the CRTE_DTS column.
Try this to search for offending values:
WHERE ISDATE(CRTE_DTS) = 0
answered Feb 24, 2011 at 03:57 PM
How is the date represented in the database?
What's the result of just running
I've just tried the following, and it's worked quite happily, so I'm reckoning there might be some extra data that's floating to the top of the "MAX" calculation...
... either that, or you've got some strange localisation settings.
answered Feb 24, 2011 at 03:50 PM