type conversion warning

Ioannis Christopoulos  

I am having a small problem.

i am trying to  abstract 2 dates, and get how many days the are, with the following code

 string lastdate2="";

  handle3 = FileOpen("Time.txt",FILE_TXT|FILE_READ);
 lastdate2=FileReadString(handle3);
FileClose( handle3 );  

         
datetime last= StrToTime(lastdate2);
datetime now   = TimeCurrent();

int      seconds = now - last;
 int        minutes = seconds/60;
 int        hours=minutes/60;
double DaysPassed =hours/24;

but i get a warning

possible loss of data due to type conversion.

Any ideas what i do wrong?


Reason: