implicit conversion from string to number

 

How do i fix this warning?

   datetime time1 = TimeToString(endOfDay,TIME_MINUTES);
 
Don't try to assign a string value to a datetime variable.
 
Keith Watford:
Don't try to assign a string value to a datetime variable.

I'm sorry, but what would be the purpose of timetostring?

 
Renz Carillo:

I'm sorry, but what would be the purpose of timetostring?

Why are you using it if you don't know what it does??

Isn't it obvious?

TimeToString()

Time  To  String
Time (datetime)  To  String (string)

It converts a datetime to a string.

 
Keith Watford:

Why are you using it if you don't know what it does??

Isn't it obvious?

TimeToString()

Time  To  String
Time (datetime)  To  String (string)

It converts a datetime to a string.

 string time1 = TimeToString(endOfDay,TIME_MINUTES);

i get it now it should be string time1 lol