Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 16th, 2012  |  syntax: None  |  size: 0.43 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data