June 23, 2005 at 7:04 pm
how do I change the type in a stored procedure from varchar to datetime? I need my results to be in datetime format for one page so I can format it the way I need.
I can't change the type in the database itself.
June 23, 2005 at 9:40 pm
Declare @StringDateVarchar (50),
@DateDatetime
Set @StringDate = '15 Jan 2005'
Select @Date = Convert(Datetime, @StringDate)
Select @StringDate, @Date
June 23, 2005 at 9:59 pm
I don't understand your reply. Here is what I have so far for my stored procedure.
(
@UserID Int
)
AS
SELECT User_ID, Position_ID, Company_Name, Position_Title, Start_Date, End_Date
FROM dbo.MySurvey_Positions
WHERE User_ID = @UserID
I need to change End_Date from varchar to datetime
June 23, 2005 at 10:41 pm
Remi - Curtis may mean using "alter procedure"....since he says he cannot change it directly in the database!
Of course I could be totally wrong (not surprising that....)
**ASCII stupid question, get a stupid ANSI !!!**
June 23, 2005 at 10:43 pm
Maybe...not sure anymore.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply