Datetime/Integer error
-
Hi guys, I'm having a pretty simple problem, but I guess I don't have the skill to solve it yet. I've wrote a string to get information from a database and put it into a label, all of that works fine but one of the fields is an Integer, and another is a datetime, so where I'm using "+"s it gives me an error, how can I solve this? Here is a shorted version of the line of code. txtMenu = txtMenu + "" + "" + " User's ID " + usrid + "" + "" + " State is " + State + "" + "" + " Date Opened was " + dateopen + "" + "" The HTML code is just for setting up a table, the error occurs between 'usrid' and 'dateopen', atleast, that's my best guess. Here is the exact error I get: "Operator '+' is not defined for types 'Double' and 'Date'.". Any suggestions would be a big help. Thanks, aqzman
-
Hi guys, I'm having a pretty simple problem, but I guess I don't have the skill to solve it yet. I've wrote a string to get information from a database and put it into a label, all of that works fine but one of the fields is an Integer, and another is a datetime, so where I'm using "+"s it gives me an error, how can I solve this? Here is a shorted version of the line of code. txtMenu = txtMenu + "" + "" + " User's ID " + usrid + "" + "" + " State is " + State + "" + "" + " Date Opened was " + dateopen + "" + "" The HTML code is just for setting up a table, the error occurs between 'usrid' and 'dateopen', atleast, that's my best guess. Here is the exact error I get: "Operator '+' is not defined for types 'Double' and 'Date'.". Any suggestions would be a big help. Thanks, aqzman
use '&' instead of '+' in vb.net '+' has the math value
-
use '&' instead of '+' in vb.net '+' has the math value
-
Hi guys, I'm having a pretty simple problem, but I guess I don't have the skill to solve it yet. I've wrote a string to get information from a database and put it into a label, all of that works fine but one of the fields is an Integer, and another is a datetime, so where I'm using "+"s it gives me an error, how can I solve this? Here is a shorted version of the line of code. txtMenu = txtMenu + "" + "" + " User's ID " + usrid + "" + "" + " State is " + State + "" + "" + " Date Opened was " + dateopen + "" + "" The HTML code is just for setting up a table, the error occurs between 'usrid' and 'dateopen', atleast, that's my best guess. Here is the exact error I get: "Operator '+' is not defined for types 'Double' and 'Date'.". Any suggestions would be a big help. Thanks, aqzman
Hello, Their is a Traditional way, for all variable(different datatype). i,e. Consider, Dim str As String = "Iam a string" Dim integ As Integer = 0 Dim da As Date = "#6/22/2007#" Dim ss As String ss = "'" & str & "' " & integ & " '" & da & "'" Answer = 'Iam a string' 0 '6/22/2007' I thing u got the answer. If hve any problem msg me friend...........