In general yes, but as always for questions like this, details matter.
More difficult to get them from Apple, somewhat less difficult to get them from Android phones. But that’s on the phone itself.
If you figure that any text message passes from your phone to your provider’s server, and from them to the recipients server, and finally to the receipient’s phone – any one of those intermediate steps could maintain logs of the message timestamp and (probably) the message itself.
And I assume that the NSA or some other government agency sucks up every message eveywhere that is sent in the US, and probably abroad. And I imagine they decrypt them along the way.
The trick on the last two—servers and government agencies – is that they wouldn’t admit anyway, and if you needed to find something important on an old message, there is no way for them to assist you on a one-on-one basis.
Good luck.