
38 Cal.App.4th 1039 (1995)
45 Cal. Rptr.2d 511
CREDITORS COLLECTION SERVICE OF ORANGE COUNTY, Plaintiff and Respondent,
v.
DAVID A. CASTALDI et al., Defendants and Appellants.
Docket No. D020506.
Court of Appeals of California, Fourth District, Division One.
September 28, 1995.
*1041 COUNSEL
Seals & Tenenbaum and Robert W. Scott for Defendants and Appellants.
Jonathan K. Golden for Plaintiff and Respondent.
[Opinion certified for partial publication.[1]]
OPINION
HUFFMAN, Acting P.J.
On this appeal we are asked to determine the statute of limitations for an action by a bank against a former customer for repayment where the bank honored a check drawn by the customer but neglected to debit the customer's account. We conclude the applicable limitations period for such an action is three years from the time the bank discovers its mistake, pursuant to Code of Civil Procedure section 338, subdivision (d).[2]
Additionally, we reject defendants' contention that there was a material variance between pleading and proof in this action.


*1042 FACTUAL AND PROCEDURAL BACKGROUND
In November of 1988, defendant and appellant Karen A. Castaldi wrote a check in the amount of $11,856 on an account with Mitsubishi Bank (which had recently merged with the Bank of California) in the name of defendant and appellant David A. Castaldi, doing business as Terra Trailers and Truck Sales.[3] The check was cashed by the payee and paid by the bank, but the bank for some reason never debited the payment from Castaldi's account. Castaldi closed the account in June 1989. In August 1989 the bank realized its mistake and requested Castaldi repay the money paid on the check. The bank eventually assigned its claim against Castaldi to plaintiff and respondent Creditors Collection Service of Orange County, doing business as Premium Collection Service.
At trial Castaldi asserted plaintiff's action was barred by the statute of limitations. The court rejected this defense and entered judgment for plaintiff in the amount of $11,856, plus interest from the date the bank discovered the mistake, and costs.

DISCUSSION

I

Statute of Limitations
The trial court found the bank lost the money at issue in this case through a mistake. Accordingly, the court concluded the applicable statute of limitations is Code of Civil Procedure section 338, subdivision (d), which provides for a three-year limitations period for "[a]n action for relief on the ground of fraud or mistake. The cause of action in that case is not to be deemed to have accrued until the discovery, by the aggrieved party, of the facts constituting the fraud or mistake." The court decided plaintiff's action was not time barred because it was filed within three years of the time the bank discovered its mistake.
Witkin explains that the "language [of Code of Civil Procedure section 338, subdivision (d)] is comprehensive and the statute, with its favorable *1043 accrual rule, is accordingly applied to any form of action, for any kind of relief. In other words, if fraud or mistake is the basis of the legal injury ... the section applies regardless of whether the complaint seeks legal or equitable relief or pleads a cause of action in tort or contract. [Citations.]" (3 Witkin, Cal. Procedure (3d ed. 1985) Actions, § 448, p. 480.)
(1a) Castaldi contends the court should have applied the one-year limitations period of Code of Civil Procedure section 340, subdivision (3) applicable to an action "by a depositor against a bank for the payment of a forged or raised check, or a check that bears a forged or unauthorized endorsement...." (Code Civ. Proc., § 340, subd. (3).) Castaldi reasons that since a customer is allowed only one year to sue a bank in such cases, the bank should also be subject to a one-year limitation in seeking repayment for debiting errors, as both types of actions involve errors on the customer's bank statement. There is no merit to this contention. The narrow limitations provision upon which Castaldi relies applies only to an action by a depositor against a bank for payment of a forged check. Clearly, it does not apply to any type of action by a bank against a depositor.
Alternatively, Castaldi contends the court should have applied the two-year limitations period for "[a]n action upon a contract, obligation or liability not founded upon an instrument in writing." (Code Civ. Proc., § 339.) This contention is also without merit.
(2) "`[T]he criterion for determining the particular statute of limitations applicable, is not the form of the action, but the substance of it and the nature of the right, the violation of which creates the right of action.'" (Ponti v. Farrell (1961) 194 Cal. App.2d 676, 683 [15 Cal. Rptr. 500], quoting MacDonald v. Reich & Lievre, Inc. (1929) 100 Cal. App. 736, 741 [281 P. 106].) Ponti and MacDonald held that the three-year limitations period of Code of Civil Procedure section 338, subdivision (4) (now subdivision (d)) applied to claims to recover money obtained by fraud, notwithstanding that the claims were pled as a common count for money had and received. Witkin states that "[a] quasi-contract action, in the form of a common count for money had and received, to recover money obtained by fraud ... or mistake, is governed by [Code of Civil Procedure section 338, subdivision (d)]. [Citations.]" (3 Witkin, op. cit. supra, at § 451, p. 482.) (1b) Since the substance of the instant action is the recovery of money paid to Castaldi by mistake, the controlling statute of limitations is Code of Civil Procedure section 338, subdivision (d).
Furthermore, a specific limitations provision prevails over a more general provision. (See Morgan v. Morgan (1923) 190 Cal. 522, 524 [213 P. 993]; *1044 Glassell Dev. Co. v. Citizens' Nat. Bk. (1923) 191 Cal. 375, 386 [216 P. 1012, 28 A.L.R. 1427].) While Code of Civil Procedure section 339 applies generally to quasi-contract actions as actions "upon a contract, obligation or liability not founded upon an instrument of writing," Code of Civil Procedure section 338, subdivision (d) applies more specifically to those quasi-contract actions which seek recovery of money obtained by fraud or mistake. Consequently, Code of Civil Procedure section 338, subdivision (d) prevails over Code of Civil Procedure section 339 as the applicable statute of limitations where, as here, the action is a quasi-contract claim based on mistake.
(3) Castaldi next contends plaintiff's action is time barred, even if a three-year limitations period applies, because the statute commenced to run from the time the bank mistakenly cashed the check without debiting Castaldi's account, rather than from the time the bank discovered its mistake. This contention is untenable. Code of Civil Procedure section 338, subdivision (d) specifically provides that a cause of action for relief based on mistake does not accrue until the aggrieved party discovers the facts constituting the mistake. Case law has interpreted this accrual provision to mean that "a cause of action for ... mistake accrues, and the limitations period commences to run, when the aggrieved party could have discovered the ... mistake through the exercise of reasonable diligence." (Sun'n Sand, Inc. v. United California Bank (1978) 21 Cal.3d 671, 701 [148 Cal. Rptr. 329, 582 P.2d 920].) Here, the court found the bank could not have discovered its mistake any earlier than it did. The court stated: "I can't use the date of '88. I have to use the date of 8-24-89. And I've checked the complaint, and they are within three years ... from the discovery of the mistake. I have no other evidence ... to go on to say that the bank should have discovered the mistake earlier. I can't do that."
The court did not err in finding plaintiff's action is not barred by the statute of limitations.[4]


*1045 II[*]

Variance
.... .... .... .... .... .... .... .

DISPOSITION
The judgment is affirmed.
Haller, J., and McDonald, J., concurred.
NOTES
[1]  Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of part II.
[2]  The parties have not briefed and we do not address the applicability of the limitations provisions of sections 3118 and 4111 of the California Uniform Commercial Code to an action of this nature. In any event, those statutes of limitations do not apply to actions commenced before January 1, 1993, pursuant to California Uniform Commercial Code section 16103. The present action was filed in 1992.

Additionally, we note there is no evidence in the record of a written agreement between the bank and the defendant customers which would require repayment of money mistakenly paid by the bank. Consequently, there is no issue before us as to the applicablity of the four-year limitations period of Code of Civil Procedure section 337, subdivision 1 for "[a]n action upon any contract, obligation or liability founded upon an instrument in writing...."
[3]  We henceforth refer to defendants collectively as Castaldi.
[4]  Castaldi alludes to the doctrine of laches by stating in the conclusion to the opening brief: "Under equity principles, the plaintiff should lose because 40 months is not a reasonable time to wait to file suit." Whether the equitable defense of laches applies to an action for money had and received is an unsettled question in California, for "[a]lthough such an action is one at law, it is governed by principles of equity [citations]." (Mains v. City Title Insurance Co. (1949) 34 Cal.2d 580, 586 [212 P.2d 873].) Case law in other jurisdictions is divided on the issue. (See, e.g., Municipality of Anchorage v. Sisters of Providence (Alaska 1981) 628 P.2d 22, 34; Peerless Ins. Co. v. Texas Commerce Bank (5th Cir.1986) 791 F.2d 1177, 1179.) We decline to address the issue, as it was not directly raised and argued at trial or on this appeal. In any event, assuming the defense of laches applies to this action, we would not disturb the implied finding of the trial court that plaintiff did not unreasonably delay in commencing this action.
[*]   See footnote 1, ante, page 1039.
