c# complex datagrid page
I currently have a page that displays 12 months in the form of bindgrids. I am trying to match the current year so that each of the bindgrids match the date displayed on the page. The current year is 2005 and the bindgrids should only show information relevant to the year 2005. My question is do I change my bindgrids to pull the year (by using convert or cast or changing the string format) and set it equal to the current year?
Also, I have tried to convert, cast and change the stringformat of a column in my db but I only receive errors:
This doesn't seem to work-
Date.Text = String.Format("{0}", (objRead["date"].ToString("{mm/dd/yy}")));
I also have not been successful in using cast or convert. The two columns in my database I have tried to use are of datatype smalldatetime and nvarchar.
Paging will eventually occur to go forward (2006, 2007, etc.) and backward (2004, 2003, etc.)
I'd appreciate anyones help,
K
|