split a date using sscanf
#1

I want to split a date for example 2015-11-26 using sscanf , I did a code but not working

pawn Код:
CMD:tests(playerid,params[])
{
    new s[128];
    new date[3]; // date[0] = day       date[1] = month         date[2] = year
    if(sscanf(params,"p<.>iii",date[2],date[1],date[0]))
    {
    format(s,sizeof(s),"Test: %i %i %i ",date[2],date[1],date[0]);
    SendClientMessage(playerid,_COLOR_AQUA,s);
    }
    return 1;
}
wanna fix , thanks in advance .
Reply


Messages In This Thread
split a date using sscanf - by DetoNater - 28.11.2015, 08:50
Re: split a date using sscanf - by fordawinzz - 28.11.2015, 08:51
Re: split a date using sscanf - by DetoNater - 28.11.2015, 09:04

Forum Jump:


Users browsing this thread: 1 Guest(s)