I'm hoping there is an easy way I can return year only or trim a datetime field to year only. I am selecting all from a table, creating a datatable and looping through the rows to find all annual reports in the table.
Dim dr As DataRow
For Each dr In dscomm.Rows
reportYear += dr("ReportYear")
This is an example of the data that is returned:
8/30/2002 7:24:00 AM10/1/2003 4:28:03 PM9/24/2004 4:30:51 PM
What I need to do is get the years only and then link those years to another page which I can handle, but I can't figure out a method to just return year?