Why doesnt this conversion work?

 

Why dosent this work OfWeek(TimeToStr(1200000000,TIME_DATE))? invalid integer number as parameter 1 for TimeToNumber function

I want to work out what day of the week a time falls on


Thanks Steve

 
tgacomp wrote >>

Why dosent this work OfWeek(TimeToStr(1200000000,TIME_DATE))? invalid integer number as parameter 1 for TimeToNumber function

I want to work out what day of the week a time falls on

Thanks Steve

use TimeDayOfWeek instead

 
Integer constants can assume values from -2147483648 to 2147483647.
 

int day = TimeDayOfWeek(1200000000);

switch (day){

case 0: Print("Sunday"); break;

case 1: Print("Monday"); break;

...

}

Reason: