programmher
Programmer
How do I convert this SQL stored proc into CF? All the variations I have tried do not work! I need to be able to call this from at least four other CF pages or just call the procedure.
Or, would it just be easier to call the procedure from an embedded CFPROC? If so, what is the proper format? CF continues to error on varchar...
SELECT @MyDate = convert(varchar(8),@MyDateTime,112)
SELECT @MyHour = str(DATEPART(hh,@MyDateTime),2)
if (SUBSTRING(@MyHour,1,1) = ' ' )
BEGIN
SELECT @MyHour = '0' + str(DATEPART(hh,@ThisDateTime),1)
end
SELECT @MyMinute = str(DATEPART(mi,@MyDateTime),2)
if (SUBSTRING(@MyMinute,1,1) = ' ' )
BEGIN
SELECT @MyMinute = '0' + str(DATEPART(mi,@MyDateTime),1)
end
select @Mine = @MyDate + @MyHour + @MyMinute
Or, would it just be easier to call the procedure from an embedded CFPROC? If so, what is the proper format? CF continues to error on varchar...
SELECT @MyDate = convert(varchar(8),@MyDateTime,112)
SELECT @MyHour = str(DATEPART(hh,@MyDateTime),2)
if (SUBSTRING(@MyHour,1,1) = ' ' )
BEGIN
SELECT @MyHour = '0' + str(DATEPART(hh,@ThisDateTime),1)
end
SELECT @MyMinute = str(DATEPART(mi,@MyDateTime),2)
if (SUBSTRING(@MyMinute,1,1) = ' ' )
BEGIN
SELECT @MyMinute = '0' + str(DATEPART(mi,@MyDateTime),1)
end
select @Mine = @MyDate + @MyHour + @MyMinute