IMO later date codes are best, because on trailers the tires will most likely age out before they wear out. I don't think I'd worry about dates codes from last year or even two years before, but I might be concerned at tires older than that.
And of course it all depends on how they're stored. I think I would express my concern to the place I'm buying from, and tell them you'll refuse to accept any tire older than 2 years. Then refuse to accept the shipment if they are too old.