Try to use TimeOfDay as a string. I think I've had this problem before...![]()
Image 1: https://i.imgur.com/DyRXU9Z.png
Image 2: https://i.imgur.com/MHHxy4w.png
Why is it doing this? Thanks
Last edited by xBear Grylls; 03-07-2013 at 05:44 PM.
Try to use TimeOfDay as a string. I think I've had this problem before...![]()
abuckau907 (03-07-2013),xBear Grylls (03-07-2013)
Conversion from string "Label2" to type 'Date' is not valid.
is because the data types are not the same. Ie. Label.Text (a string) must be set == a string
Dim xx as Int32 = "MyNameIsSteve" // invalid! a number can't be set to a string.
Dim ss as String = 123456 // invalid!
Dim xx as DateTime = 1234 // invalid.
Dim xx as Int32 = Date.Now() // invalid.
ie. as pepsihacker said 'Try to use TimeOfDay as a string.'
Label1.Text = Date.Now.ToString() // has LOTS of overloads.
(ToString is special, I'm not going to explain why)
Label1.Text = TimeOfDat <--String variable, Date variable--> NOT the same 'type'.
Last edited by abuckau907; 03-07-2013 at 08:17 PM. Reason: not sure tbh
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
DawgiiStylz (03-07-2013)
Errrm, lol?
MsgBoxStyle is part of the actual message of the MSGBox. you might wanna change where the quotation marks are.

14
Solved
I dont know how to change it.
Here are several methods to fix your error (@abuckau907 these methods are "better" in my opinion.)
1.) Create a global variable for the date you are waiting for.
2.) Use
OR you can also useCode:if wait_date <= date.now then 'code else 'code end if
This is assuming you are using date.now for the date, or are at least following correct date datatype formatting. (Example (Generated with date.now) 3/10/2013 4:33:55 PM)Code:if Cdate(label2.text) <= date.now then 'code else 'code end if
If You Like My Releases, Hit The Thanks button!
Follow the rules.
Successful Purchases: 2
Successful Sales: 1@The403
@sundy42
Scammed: 1@wZ. Gali
Favorite Quotes:
(@rileyjstrickland "Better." Better than what? Did I post a solution to his problem, or a description (albeit poor) of the problem?
When OP knows what data type is, I might start talking about 'efficiency'/'better'.)
Last edited by abuckau907; 03-10-2013 at 10:25 PM.
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
If You Like My Releases, Hit The Thanks button!
Follow the rules.
Successful Purchases: 2
Successful Sales: 1@The403
@sundy42
Scammed: 1@wZ. Gali
Favorite Quotes:
ok .
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
label1.text = timeofday
if label2.text = label1.text then
label3.text = "Alarm!!"
timer1.stop
endif
Easy way.

14
Its solved a while ago.