SY
Hello,
My ARIS Scripts are as follows.
oOutput.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0); oOutput.OutputField(Constants.FIELD_DATE, "Arial", 14, RGB(0,0,0), Constants.C_TRANSPARENT, Constants.FMT_BOLD | Constants.FMT_CENTER); oOutput.EndParagraph();
Case 1
Output format *.DOC, the output is
2011-09-15
Case 2
Output format *.pdf, the output is
11.9.15
I have no idea of this different output in Case 1 and Case 2.
I want to print out like Case 1's output like "2001-09-15" in pdf format.
Can anyone tell me how to correct this problem ?
Regards
Hi,
instead of using Constants.FIELD_DATE use JAVA SimpleDateFormat Class. This should work in both cases:
var oSimpleDateFormat = new java.text.SimpleDateFormat( "yyyy-MM-dd" ); var dateVal = oSimpleDateFormat.format( new java.util.Date() ); oOutput.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0); oOutput.OutputField(dateVal, "Arial", 14, RGB(0,0,0), Constants.C_TRANSPARENT, Constants.FMT_BOLD | Constants.FMT_CENTER); oOutput.EndParagraph