I have a textbox1 and adding to database date field using
e.Command.Parameters("AddTime").Value = TextBox1.Text
It is working fine, but it only adds record like this
18/6/2013
However, I want it to add 00:00:00 AM all the time, ie
18/6/2013 00:00:00 AM
and need to be a date format (ie not text).
How to modify my code ? I tried this but still adding only 18/6/2013
e.Command.Parameters("AddTime").Value = (TextBox1.Text + " 00:00:00 AM").ToString
So I first go test my database: If I modify to e.Command.Parameters("AddTime").Value = DateTime.Now
then it can add in 18/6/2013 3:14:15 PM format.
So the database is good but my code
need modification. How ? Thanks
Thanks
...
Go to the complete details ...