- Invoice Number = Now.Year & Now.Month & ?????
- Dim str = DateTime.Now.Year & DateTime.Now.Month.ToString("00")
- Sub Main()
- For i = 1 To 12
- Console.WriteLine(GetAutonumber(i))
- Next
- End Sub
- Public Function GetAutonumber(no As Integer) As String
- Dim strNum = no.ToString()
- Dim str = DateTime.Now.Year & DateTime.Now.Month.ToString("00") & New String("0", 5 - strNum.Length) & strNum
- Return str
- End Function