Showing posts with label DAY. Show all posts
Showing posts with label DAY. Show all posts

Wednesday, November 22, 2017

HOW TO GET DAY OF THE WEEK IN MICROSOFT DYNAMICS AX

HOW TO GET DAY OF THE WEEK IN MICROSOFT DYNAMICS AX 
static void dayOfWkExample(Args _arg)
{
    date d = today();
    int i;
    ;
    i = dayOfWk(d);
    print "Today's day of the week is " + int2Str(i);
    pause;
}

Thursday, May 4, 2017

DATE FUNCTIONS IN AX 2012 AND AX 2009 : MICROSOFT DYNAMICS AX 2012 :X++ CODE DAY MONTH YEAR TIME ETC

static void date_Functions(Args _args)

{
    Transdate    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 from the given date...
    info(strfmt("Month Name - %1",mthname(mthofYr(d))));
  
    //Gets the day for the given 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 weekday number from the date...
    info(strfmt("Weekday number - %1",dayOfwk(d)));
  
    //Gets the day of the year from the given date...
    info(strfmt("Day of year - %1",dayOfyr(d)));
  
    //Gets the week of the year from the given date...
    info(strfmt("Week of the year - %1",wkofyr(d)));
}

Tuesday, April 12, 2016

GET DATE IN MICROSOFT DYNAMICS AX 2009 - 2012 DAY OF MONTH

Date functions in AX 2009

static void DATE(Args _args)
{
    Transdate    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 from the given date...
    info(strfmt("Month Name - %1",mthname(mthofYr(d))));
  
    //Gets the day for the given date...
    info(strfmt("Day - %1",dayOfMth(d)));
  
    //Gets the day name from the given date...
   info(strfmt("Day Name - %1",dayname(dayOfwk(d))));
  
    //Gets the year for the given date...
    info(strfmt("Year - %1",year(d)));
  
    //Gets the current weekday number from the date...
    info(strfmt("Weekday number - %1",dayOfwk(d)));
  
    //Gets the day of the year from the given date...
    info(strfmt("Day of year - %1",dayOfyr(d)));
  
    //Gets the week of the year from the given date...
    info(strfmt("Week of the year - %1",wkofyr(d)));
}

Related Posts Plugin for WordPress, Blogger...