Experts Exchange connects you with the people and services you need so you can get back to work.
At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.
create table #Tmp
insert into #Tmp select '14/02/2011',0
insert into #Tmp select '14:02:2011',0
insert into #Tmp select '14:02/2011',0
insert into #Tmp select '14/02:2011',0
declare @DateValue nvarchar(20)
while ((select count(*) from #tmp where validDate=0)<>0)
select top 1 @DateValue= datevalue from #Tmp where validDate=0
update #Tmp set validDate=1 where datevalue = @DateValue and convert(datetime,datevalue,103) = convert(datetime,@DateValue,103)
--select convert(datetime,date) from #Tmp
update #Tmp set validDate=2 where datevalue = @DateValue
select * from #Tmp where validDate= 2 --Error occured
drop table #Tmp
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $174.99.
Premium members get this course for $389.00.
Premium members get this course for $159.20.
Premium members get this course for $62.50.
Premium members get this course for $95.20.
Premium members get this course for $12.50.
Premium members get this course for $37.50.