save date and time separately in sql 2005 using

dreskei's Avatar, Join Date: Oct 2010
Go4Expert Member
i have to insert date and time separately into the record using tried a lot...but it gives an error "object reference not set to an instance of an object"

please help me out
dotNet Zombie's Avatar, Join Date: Aug 2010
Go4Expert Member
What does your Data Schema look like.

Explain a little more what you mean by seperating the date and time. Are you doing something like this?

string[] arrayDate = DateTime.Now.Date.ToString().Split(' ');
string date = arrayDate[0];
string time = arrayDate[1];