Petitioner, incarcerated for a conviction of cocaine possession with intent to distribute, has filed a Notice and Motion to Vacate Conviction with Memorandum of Law and Facts. Petitioner seeks to vacate his conviction, entered on August 8,1988. In his motion, Petitioner asserts that he is seeking to invoke the subject matter jurisdiction of this Court “pursuant to the writ of error coram nobis.” Although entitled a motion to vacate conviction, the text of the motion clearly indicates that Petitioner is actually seeking a writ of error coram nobis. The Court would not have jurisdiction had Petitioner indeed filed a motion to vacate conviction because it would have been filed more than twenty-one days after the criminal proceedings came to an end. Consequently, the Court will evaluate Petitioner’s motion as a writ of error coram nobis. On the grounds set forth below, the Court denies Petitioner’s motion.
The purpose of the writ of error coram nobis, authorized by Virginia Code § 8.01 -677, is to afford the court an opportunity to correct its own record to account for an essential fact not known when the judgment was rendered and which could not have been presented by a motion for a new trial, appeal, or other existing statutory proceeding. See Dobie v. Commonwealth, 198 Va. 762 (1957). In Dobie, the Virginia Supreme Court emphasized that the writ cannot aid an applicant “where advantage could have been taken of the alleged error at trial, as where the facts complained of were known before or at the trial, or *325where at the trial the accused or his attorney knew of the existence of such facts but failed to present them.” 198 Va. at 769.
Petitioner’s motion raises two claims: (1) that he was denied due process of law because a competency hearing was not conducted; and (2) that his Fifth Amendment rights were violated by not being advised of his Miranda rights when he was first arrested. See Miranda v. Arizona, 384 U.S. 436 (1966). Dr. F. Daniel McClure examined Petitioner in October of 1987, almost a year prior to his August 15, 1988, indictment for this conviction. In 1987, Dr. McClure determined that Petitioner exhibited many of the traits associated with an anti-social personality disorder. This determination was available to both Petitioner and his attorney before and during his trial. Petitioner had knowledge of both the possible mental disorder and Miranda defenses at trial and did not raise them. He has thereby waived these defenses.
Petitioner is not eligible for a writ of error coram nobis because he and/or his attorney knew of the existence of the facts in question and failed to present these facts at trial.