The obligations of confidentiality created by an NDA can continue indefinitely or end on a predetermined date.
Although, it should be noted that the duties of non-disclosure can extend beyond the formal end of the agreement. For example, trade secrets are considered valuable business assets and are generally protected indefinitely by Canadian law.
Also, an NDA will not be enforceable if the confidential information becomes publicly known (through no fault of the receiving party) because it can no longer be defined as confidential information.