kizziebutler
Programmer
I have a field (date_booked) that contains dates, it an char field. I like to be able to convert if from a char field to a datetime field and then validate it using ISDATE to check if the date is valid.
Select date_booked =
case ISDATE(date_booked)
when 0 then convert(vharchar(25), date_booked, 120)
when 1 then convert(varchar(25),Getdate(),120)
end
from sbase_local.cellularlocal..jobs
Select date_booked =
case ISDATE(date_booked)
when 0 then convert(vharchar(25), date_booked, 120)
when 1 then convert(varchar(25),Getdate(),120)
end
from sbase_local.cellularlocal..jobs