Recover two weeks old stored proc which has changed since
There's no way to recover the code unless you restore a backup of the server taken prior to when you updated the database with your change. But I would just check your source control repository and re-run the prior version.
This is why one generally keeps stored procedures, triggers, table definitions and the like in a source control system, like e.g. Git. That would prevent this sort of situation from happening again and provide many other benefits, such as versioning.