Get the day of the week
#5

Quote:
Originally Posted by Emmet_
View Post
This should do the trick.

pawn Code:
stock ReturnWeekDay()
{
    new
        weekday[16];
        year,
        month,
        day;
    getdate(year, month, day);
    switch(month)
    {
        case 1: weekday = "January";
        case 2: weekday = "February";
        case 3: weekday = "March";
        case 4: weekday = "April";
        case 5: weekday = "May";
        case 6: weekday = "June";
        case 7: weekday = "July";
        case 8: weekday = "August";
        case 9: weekday = "September";
        case 10: weekday = "October";
        case 11: weekday = "November";
        case 12: weekday = "December";
        default: weekday = "Unknown";
    }
    return weekday;
}



He meant to return the weekday such as Monday, Tuesday, Wednesday.
uR Code gives month not the day
Reply


Messages In This Thread
Get the day of the week - by MP2 - 19.09.2011, 23:31
Re: Get the day of the week - by dowster - 20.09.2011, 01:38
Re: Get the day of the week - by SourceCode - 20.09.2011, 01:44
Re: Get the day of the week - by Emmet_ - 20.09.2011, 01:44
Re: Get the day of the week - by SourceCode - 20.09.2011, 01:48
Re: Get the day of the week - by Emmet_ - 20.09.2011, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)