I want a method to separate letter from a String .i m using .Net(C#)
example:
String-"12/12/2003"
i want -"2003" only is there any predefined function Like MID(in visual basic).
if the string above "12/12/2003" will always be in that format then you could try this.
Dim d as string = "1/9/2007"
Dim a as array = split(d, "/")
'Now we have split the date up into 3 different ordinals 1, 9, and 2007
'Next you return the last ordinal...remember indexing always starts at 0
Return a(2)
or you can do this...
Dim d As Date = "1/9/2007"
Response.Write(d.Year)