hi,i assigned datetime datatype for an column(year).
if the user enter the year in the textbox(year column)
it appears as " mm/dd/yy " format..
i nedd only year from this to be saved into my db when user enter the year...
this is for wpf windows applciation,c#...
reagrds
jai
Hirendra SisodiyaPosted Apr 9, 2010, 12:57 AM
hello kumar
use this code:
Dim dt As DateTime
dt = CDate(TextBox1.Text)
Dim year As String = dt.Year
thanks
Please mark as answere if it helps