Monday, 20 April 2015

Date functions in ax 2012

Date functions in ax 2012


/ TransDate  d;
    
     OR

      date d;
    ;
     d=today();
      
    info(strFmt("date - %1",d));
    //Gets the month for the given date...
    info(strFmt("month  %1",mthOfYr(d)));
    
    //Gets the month name form the give data....
    info(strFmt("month Name %1",mthName(mthOfYr(d))));
   // Gets the day for the give  date...       
    info(strFmt("day %1",dayOfMth(d)));
     //Gets the day name from the given date...
     info(strFmt("Day Name %1",dayName(dayOfMth(d))));
    // //Gets the year for the given date...
    info(strFmt("year -%1",Year(d)));
    //gets the Current weekend number from the Date....
    info(strFmt("weekday number - %1",dayOfWk(d)));
    //gets the  day of  the  year  form  the give date...
    info(strFmt("Day  of year - %1",dayOfYr(d)));
    // gets the  week of the  year  form the give data...
    info(strFmt("Week of  the year - %1 ",wkOfYr(d)));

No comments:

Post a Comment