Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

Code to get month and year

$
0
0

Dear All,

My Name  Didik

Please Help me.

I have code to get the periode in month and year. But it doesnt work when the months are oct,nov and december (10,11 and 12). My Code doesn't work when month after september.

when I debug this code, its always refer to jan (01/2013), but when its jan to sep (1 - 9) its run well.

this my code :

dialog         = new dialog('Service Centre');

    dialog.addGroup('Parameter');
    dialogPeriode  = dialog.addFieldValue(typeid(MonthYear), Periode, "Month/Year");

    dialog.run();
    if (dialog.closedOk())
    {
        argsdialog  = '' ; 
        argsdialog  = argsdialog + substr('0' + int2str(mthofyr(periode)),strlen('0' + int2str(mthofyr(periode)))-2,2) + int2str(year(periode));

 

 

how to fix this?


Viewing all articles
Browse latest Browse all 9880

Trending Articles