Interview Questions

Saturday, July 9, 2016

Print first day of the month

static void FirstDayOfTheMonth(Args _args)
{
    Transdate   a, c ;
    Test1            TM_Test, _TM_Test;
    int                 b;


    select forupdate TM_Test;
    c   =  DateStartMth(TM_Test.FirstHalfPresence) ; // 1st day

    if (dayOfwk(c) == 7)
    {
         Info("Its WeekOff");
    }
    else
    {
        info(strfmt("%1 , %2", 'Its not sunday', dayOfwk(c)));
    }
}