That still tells us nothing useful. Where are you getting the value from in the first place, how are you reading it and how are you adding it to the DataRow?
Printable View
That still tells us nothing useful. Where are you getting the value from in the first place, how are you reading it and how are you adding it to the DataRow?
jmcilhinney,Quote:
Originally Posted by jmcilhinney
DateTime in SQLServer does NOT contain milliseconds. The resolution is 3.333333mS not 1mS!!!
As I postd very early in the thread, from the MSDN documentation.
Therefore is it IMPOSSIBLE to store times with 1mS resolution in a DateTime field in SQLServer. You MUST use some other data type.Quote:
Values with the datetime data type are stored internally by the SQL Server 2005 Database Engine as two 4-byte integers. The first 4 bytes store the number of days before or after the base date: January 1, 1900. The base date is the system reference date. The other 4 bytes store the time of day represented as the number of 1/300-second units after midnight.
I want to use search Conditions like(<,>,<=,>=) for TimeColumn.Currently my datatype is string .how can i do that
regards
laby
I already told you, with a string field it will be very difficult and very low performance. If you are going to do calculations or comparisions, use a numberic field type with sufficient range to handle your information.Quote:
Originally Posted by laby
The OP keeps telling us that the original data only goes to two decimal places, so the greatest resolution needed will be 10 ms!!! Thus 3.333333 ms will be ample!!! The problem here is that the OP is dropping the partial seconds altogether somewhere between the original data and the database. Given that, despite my repeated attempts, the OP still refuses to provide that information I can only conclude they don't actually want any help and don't deserve it. I won't be wasting any more time on this one.Quote:
Originally Posted by TheCPUWizard
The (all too common) issue of the OP not providing the necessary information to be of assistance, does NOT mean that one should post known WRONG information in the forums. Or if the error was not known at the time of the posting, that it should not go back and be corrected.Quote:
Originally Posted by jmcilhinney
These threads are read for years after they have been created. Often by tens of thousands of people.
Your post of
is NOT correct.Quote:
If you're saving a DateTime value to a database then it already "contains" milliseconds, as every DateTime value does.