I would like to know how to insert TIME into SQL Server using C#
I have a class that I use as a data layer:
public class Main_Lom_Form
{
public string Specimen_ID
public int Client_Key
public string Outcome
public string Medications
public DateTime Date_Collected
public DateTime Time_Collected
and I do not know if I should be declaring Time_Collected as DateTime?
What type should Time_Collected be so that if the time would be 13:05 it would be entered correctly into a column in SQL Server 2008 that is a TIME(7) datatype?
Date_Collected.TimeOfDay.ToString()and SQL-Server will parse it to the correct TIME(7) datatype. msdn.microsoft.com/en-us/library/bb677243.aspx