I am trying to pull the milliseconds from a datetime column using CAST(DATEPART(millisecond, qual.time)AS VARCHAR(3))
I need the first two digits of the milliseconds with a leading zero.
Right now if the milliseconds is .090 I am getting .90 back which is incorrect. I have tried casting to an INT but i get an error that "String 2:2 cannot be cast to an int". I believe this is from the data in the database which is 1900-01-01 02:02.090 . For some reason the datepart function and the cast are attemping to convert the entire date instead of just the milliseconds.