chkueh
asked on
How to change the Year format, VB.Net 2003
Hi, Experts...
How can i change the year for to ABC-09-0123 into ABC-2009-0123?
Below is the code that i declare:-
CurrentYear As String = Mid(Year(Now), 3, 4)
Label1.Text = "ABC" & "/" & CurrentYear & "/" & Format("0000")
Thank you.
How can i change the year for to ABC-09-0123 into ABC-2009-0123?
Below is the code that i declare:-
CurrentYear As String = Mid(Year(Now), 3, 4)
Label1.Text = "ABC" & "/" & CurrentYear & "/" & Format("0000")
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what is Format("0000")? I think it should read
Label1.Text = "ABC" & "/" & Date.Today.Year.ToString() & "/" & YourIntegerVariable.tostri ng("0000")
Label1.Text = "ABC" & "/" & Date.Today.Year.ToString()
Label1.Text = "ABC" & "/" & CurrentYear.ToString("yyyy