Hello Guys!
I am tryimg to get table's field of year day moth but I have to write like;
for example the date is 01/01/2016 and i have to return return 2016-quarter 1 in display method to show on form
january february mrah is quarter 1 and april may june is quarter 2 .....
I have get the date is from table and then I have to return the date's quarter and year.
could you guys help me please?
Hi,
Try Like this...
static void SK_date(Args _args) { int month; month = mthOfYr(systemDateGet()); info(strFmt(int2str(month))); if(month<=3) { info(strFmt('Quarter1-%1',year(systemDateGet()))); } else if(month >= 4 && month < 7) { info(strFmt('Quarter2-%1',year(systemDateGet()))); } }
thank you so much for reply but I neeed to use table's date field not the systemdate i wrote the this display but it does not make sense display Date dispyear1() { vendtable vendtable ; transdate AccountingDate; d= vendTable.AccountingDate; int month; month =mthofyear(table.AccountingDate); if(month<=3) { d = strFmt("Quarter1-%1",year(vendTable.AccountingDate); } else if() ..... else if() ... return d; }
You don't have to reinvent the wheel. You already have the code in, \Classes\FiscalCalendars\findQuarterByDate.
smoch9339 said:I am confusing about the getting date from the table's field actually
What is the issue with fetching the date from table? (table.dateField)