Mike DiRenzo (1/17/2008)
Try this:Without sampling a large population of your nvarchar date data, I will assume the example you gave will be sufficient.
Here I simulate your scenario.
declare @TestDateValue nvarchar(50)
set @TestDateValue = '01/01/05'
select cast(@TestDateValue as datetime) as NewTestDateTime
The variable @TestDateValue is now a datetime.
Actually - no. You haven't done anything to @testdatevalue itself. The result in the NewTestDateTime is a datetime.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?