In sql server 2005 , I have a database say history and table record history which as column A which is stored as DateTime(Date and Time gets stored), column Time which is stored as char(Time only gets stored). In column C I need Time difference between column A and Column B whenever I update Time (coloum) in visual studio 2010 using c# code.
How will I get the Time difference. Since one is in dateTime format and in other only Time gets stored up in char? Please give the code. I tried but got error