I have tried quite a few time formats in my code behind to get SQL Server to store the time as well as the date but the only way I can get what I want is if I edit directly in SQL Server. I tried editing SQL Server directly just to rule it out as the problem.
I started trying with this:
CrtDate.Text = DateTime.Now.ToString("D")
And ended up with this:
CrtDate.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss tt")
What's inserted each time is the date and all zeros for the time. For example, 2014-09-04 00:00:00.000 instead of, say, 2014-09-04 14:02:15.008. What am I missing?
Thanks in advance for your help!
Go to the complete details ...