Popular Posts

Tuesday, 19 July 2011

Date Calculation

Date Calculation :

static void DateCalcu(Args _args)
{
    TransDate   fromDate,toDate;
    int         reqDays;
    ;
  
    fromDate    = mkdate(01,07,2011);
    toDate      = mkdate(19,06,2011);
  
    if(fromDate && (toDate > fromdate))
    {
        reqDays = todate - fromDate;
    }
    else
    {
        throw error(strfmt("To-date %1 must be greater than from-date %2",todate,fromdate));
    }
    info(strfmt("%1",reqDays));
}

No comments:

Post a Comment