tekgod01 Posted July 26, 2004 Posted July 26, 2004 Our company uses a serial number that is based on today's date. The month has a letter equivalent, then the last digit of the year, then the day. I'm using Case for the month and adding Today.Day for the day. How do I add the last digit of the year? For example, today's serial number would be: G426 I'm stuck on trying to get the four out of the year. Thank you. Quote
tekgod01 Posted July 26, 2004 Author Posted July 26, 2004 *sigh* Case 7 : lblSerial.Text = "G" & Now.ToString("ydd") Quote
Administrators PlausiblyDamp Posted July 26, 2004 Administrators Posted July 26, 2004 The following should work (does assume the year will alway be four characters long though) Dim s As String = Date.Now.Year.ToString().Substring(3) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.