SHARE
TWEET

Untitled

a guest Nov 16th, 2012 26 Never
  1. Invoice Number = Now.Year & Now.Month & ?????
  2.        
  3. Dim str = DateTime.Now.Year & DateTime.Now.Month.ToString("00")
  4.        
  5. Sub Main()
  6.     For i = 1 To 12
  7.         Console.WriteLine(GetAutonumber(i))
  8.     Next
  9. End Sub
  10.  
  11. Public Function GetAutonumber(no As Integer) As String
  12.     Dim strNum = no.ToString()
  13.     Dim str = DateTime.Now.Year & DateTime.Now.Month.ToString("00") & New String("0", 5 - strNum.Length) & strNum
  14.     Return str
  15. End Function
RAW Paste Data
Top