Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Conversion
Message
From
28/06/2004 19:46:35
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Date Conversion
Miscellaneous
Thread ID:
00918203
Message ID:
00918203
Views:
35
I am having trouble with converting dates. I get the following message:

"Server: Msg 241, Level 16, State 1, Procedure sp_fy_gen, Line 31
Syntax error converting datetime from character string."

Part of Code below

"@tcp is the input parameter"

Declare @string varchar(12),
@bofy datetime

if month(tcp) > 9
set @string = '10/01/' + str(year(tcp))
set bofy = convert(datetime, @string, 101)
end if
Next
Reply
Map
View

Click here to load this message in the networking platform