The problem sits in a handful of lines. The code checks whether the year falls below 1000, then prepends a single zero. That padding—meant to cover historical dates like the founding of the Tang Dynasty—fails at anything before 1000 AD. Caesar Augustus died in year 14, which becomes "014" instead of "0014". The application never used such dates anyway. Later code reformatted through built-in date types, so the special logic served no actual purpose. Hungarian notation adds to the obscurity; the vnt prefix remains unexplained throughout the codebase.
mnYear% = CInt(Year(vntDate))
If mnYear% < 1000 Then
msYear$ = "0" & Trim$(CStr(mnYear%))
Else
msYear$ = Trim$(CStr(mnYear%))
End If



Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.