Can my second DWI be treated like a first if the first happened a long time ago?

Yes, if your first conviction was more than ten years ago, the court may treat your current charge as a first offense, but this must be properly argued.