Narshe,
Are you basing this on what you see in the debugger for Value? Have you
looked at the object itself and found that the time values are actually
zero? When you persist it ack to the database, does it not include the
time?
If this is the case, then have you tried using the constructor to
SqlDateTime which takes a DateTime parameter, and setting it like that?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Narshe" <na****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
If I use this simple code
SqlParameter param = new SqlParameter( "@param", SqlDbType.DateTime );
param.Value = System.DateTime.Now;
param.Value is "11/2/2005" rather than "11/2/2005 10:42:15 AM"
How do I get it so the sql value is the same as the C# value, and not
truncated?