Appellant, adjudicated below a delinquent child, argues the trial court erred in refusing to dismiss a petition charging him delinquent because (1) he was twice placed in jeopardy for the same offense, and (2) the state failed to file the petition within 30 days of the date the delinquency complaint was filed with the Division of Youth Services.
A juvenile report was filed on November 29, 1977, with the Division alleging appellant delinquent for stealing a package of glue from Woolco Department Store. The state filed a petition on December 28, 1977, alleging the same facts. Hearing on the petition was held February 15, 1978, at which time an employee in the automotive department at Woolco testified he saw appellant place a package of glue under his shirt on November 28, 1977. Testimony revealed that the employee-witness was not employed by Woolco but by Amron, an automotive supply company which leases space in Woolco, and that the glue belonged to Amron. When it was discovered that the petition incorrectly alleged Woolco the owner, the state moved to amend the petition, and appellant’s objection to the state’s motion to amend was sustained. Appellant moved for a judgment of acquittal, and the state moved to nolle prosequi. The trial judge granted the state’s motion.
Immediately after the hearing, the state filed a second petition, identical to the first except that Amron was named victim of the theft. Appellant moved to dismiss on the grounds previously stated, and the motion *102was denied. A second hearing was held, following which appellant was adjudicated delinquent.
Appellant first argues that the filing of the second petition after testimony had been taken exposed him to double jeopardy. We disagree with appellant. Former jeopardy attaches if a defendant has already been prosecuted in the same state for the same offense, if the parties in the second prosecution are identical to those in the first prosecution, and if the particular offense which was the subject of the first prosecution “was such an offense as to constitute a bar.” State v. Beamon, 298 So.2d 376, 379-80 (Fla.1974). The facts in Beam-on are similar to those in appellant’s case. An information charged Beamon with robbing a victim on November 26. Later, a bill of particulars stated the crime occurred on November 24. At trial, Beamon moved for and was granted a judgment of acquittal after the victim testified she was robbed on November 26. The next day the state filed an information and a bill of particulars charging Beamon with robbery of the same victim on November 26. The Supreme Court held that the second information did not place Beamon twice in jeopardy for the same offense. The bill of particulars in each information had the effect of limiting the state to proof that the crime occurred on a particular date, and proof of another date would not justify conviction. The Beamon court reaffirmed Le Rea v. Cochran, 115 So.2d 545 (Fla.1959), State v. Bentley, 81 So.2d 750 (Fla.1955), and State v. Cootner, 60 So.2d 734 (Fla.1952): “Each of those cases stand for the proposition that double jeopardy does not bar prosecution for an offense where a previous accusatory document mistakenly identified one of the essential elements of the offense and an acquittal under the prior accusatory document had been obtained.” Beamon, supra at 380.
Here, the first petition mistakenly identified the victim of the theft, and the charge was nolle prossed. “The offense charged in the first [petition] . . . was not the same offense as that charged in the second . .” Beamon, supra at 380.
In support of his argument that the prosecution under the second petition placed him twice in jeopardy, petitioner urges that the trial court erred when it refused to allow the state to amend the first petition because the variance was not material. Appellant is estopped from making such argument since he objected at the hearing that the variance was material. Beamon, supra at 378. Further, it is clear that the variance was material. Recently, in State v. Sobel, 363 So.2d 324 (Fla.1978), the court restated the test for determining whether a variance between the accusatory document and proof at trial is material and mandates dismissal or acquittal:
In deciding whether or not the variance is fatal, we must determine whether the information is “so vague, indistinct and indefinite as to mislead the accused and embarrass him in the preparation of his defense or expose him after conviction or acquittal to substantial danger of a new prosecution for the same offense.” (363 So.2d p. 328).
That test is based on Fla.R.Crim.P. 3.140(o), which is identical in all material respects to Fla.R.Juv.P. 8.110(d).1 Here, appellant was prejudicially misled by the variance. He was prepared to defend against the charge alleging he stole from Woolco. During the hearing, the state moved to amend the petition to charge a different offense than that which petitioner was prepared to defend. The trial judge did not err in allowing the state to nolle prosequi the petition. See also Crowell v. State, 238 So.2d 690 (Fla.3d DCA 1970).
*103We agree, however, with appellant’s second point that the later petition should have been dismissed because it was filed more than 30 days after the complaint had been filed with the Division of Youth Services. Section 39.05(7), Fla.Stat. (1977), states, “On motions by or in behalf of a child, a petition alleging delinquency shall be dismissed with prejudice if it was not filed within 30 days from the date the complaint was referred to the intake office.” The state responds that appellant was not prejudiced by the later filing, and the time was tolled by the filing of the first petition since both alleged the same offense. The statute, however, gives the trial court no discretion to deny motions to dismiss under § 39.05(7) when it is clear a petition is not filed within the designated 30 days. The statute, like § 775.15(5), describing the time within which criminal prosecutions must be commenced, gives a juvenile, upon an appropriate showing in a motion to dismiss, a substantive right to have the charges against him dismissed. S. R. v. State, 346 So.2d 1018 (Fla.1977). Compare, Waters v. United States, 328 F.2d 739 (10th Cir. 1964).
The state’s argument as to the second point, that the § 39.05(7) time period was tolled when the petition was first filed, is also without merit. Discussing the effect of Arizona’s criminal statute of limitations,2 the court in State v. Fogel, 16 Ariz.App. 246, 492 P.2d 742 (1972), stated that there are generally three types of such statutes: “(1) Statutes which provide that an indictment must be filed within a specified time, (2) statutes which provide that prosecution must commence within a specified time, and (3) statutes which provide that the statute of limitations is tolled if an indictment is quashed.” Id. at 744. Since only filing a petition will toll the time in § 39.05(7), and since the statute has no “savings clause” which would allow defective petitions to toll the time, it is a statute of the first type described by the Arizona court.3
Fogel held the Arizona statute was also in the first category and that after three grand jury indictments were quashed because a disqualified attorney had presented evidence, three more indictments charging the same offenses and filed outside the statute of limitations were not saved by the timely filing of the three original indictments. The state’s argument that it had not stopped “diligently pursuing” the indictments was irrelevant. Id. at 744.
Here the defect in the first accusatory document was more than formal. The defect was material, charging a wholly different offense than that which the state sought to prove at the first hearing, and later, charged in the second document. Given these facts and the requirements of § 39.05(7), the 30 day period was not tolled when the state filed the first petition.
Appellant’s adjudication of delinquency is REVERSED.
SMITH, Acting C. J., and MITCHELL, HENRY CLAY, Jr., Associate Judge, concur.. Which provides:
No petition or any count thereof, shall be dismissed, or any judgment vacated, on account of any defect in the form of the petition or of misjoinder of offenses or for any cause whatsoever unless the court shall be of the opinion that the petition is so vague, indistinct, and indefinite as to mislead the child, his parent(s), or custodian(s) and prejudice him (them) in the preparation of his (their) defense.
. “An indictment . . for a felony . shall be found . . . within five years after its commission.” A.R.S. § 13-106(B) (1972). “Found” means “duly returned and presented by the grand jury in open court.” A.R.S. § 13-106(D) (1972).
. Compare § 775.15(5), Fla.Stat. (1977), which states that a prosecution is commenced with the filing of an indictment or an information, but provides that indictments or informations dismissed or set aside because of formal defects toll the statute for three months. We extensively considered the effect of § 775.15(5) in State ex rel. Fla. Petro. Mktrs. Ass’n, Inc. v. McClure, 330 So.2d 239, 243-244 (Fla. 1st DCA 1976), as to criminal prosecutions and concluded: “[A] restorative indictment . . . , filed within three months of one timely filed but dismissed, is effective to continue the prosecution . .