Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   save date and time separately in sql 2005 using c#.net (http://www.go4expert.com/forums/save-date-time-separately-sql-2005-t23710/)

dreskei 30Oct2010 00:59

save date and time separately in sql 2005 using c#.net
 
i have to insert date and time separately into the record using c#.net.....i tried a lot...but it gives an error "object reference not set to an instance of an object"

please help me out

dotNet Zombie 1Nov2010 20:47

Re: save date and time separately in sql 2005 using c#.net
 
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?

Code:

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



All times are GMT +5.5. The time now is 01:50.