How can i check the days between 2 dates?
#5

PHP Code:
stock DatesTime(Start[], End[],&offest)
{
    new 
dtmp[256], idx1idx2;
    
dtmp strtok(Startidx1'.');
    new 
StartDay strval(dtmp);
    
dtmp strtok(Startidx1'.');
    new 
StartMonth strval(dtmp);
    
dtmp strtok(Startidx1'.');
    new 
StartYear strval(dtmp);
    
dtmp strtok(Endidx2'.');
    new 
EndDay strval(dtmp);
    
dtmp strtok(Endidx2'.');
    new 
EndMonth strval(dtmp);
    
dtmp strtok(Endidx2'.');
    new 
EndYear strval(dtmp);
    new 
init_date mktime(12,0,0,StartDay,StartMonth,StartYear);
    new 
dest_date mktime(12,0,0,EndDay,EndMonth,EndYear);
    
offest dest_date init_date;
    
offest floatround(offest/60/60/24floatround_floor);
    return 
1;

enjoy.
Reply


Messages In This Thread
How can i check the days between 2 dates? - by tal_peretz - 03.06.2011, 15:19
Re: How can i check the days between 2 dates? - by Donya - 03.06.2011, 15:35
Re: How can i check the days between 2 dates? - by tal_peretz - 03.06.2011, 15:36
Re: How can i check the days between 2 dates? - by jameskmonger - 03.06.2011, 16:41
Re: How can i check the days between 2 dates? - by tal_peretz - 03.06.2011, 17:26

Forum Jump:


Users browsing this thread: 1 Guest(s)