Ireport formatting help for beginner

0

I have member IDs and their date of births so I need to generate this final structure:   member ID + First Capital letter of birth month +2 digit day of birth

member ID: 123456 

DOB: 6/7/2011

final result:   123456J07

here are the fields in my Ireport: 

member ID: $F{localId}           Expression Class:  (java.lang.String)

DOB: $F{person}.getDob()        Expression Class:(java.lang.string)   Patttern: MM/dd/yyyy

I am having issues with the cast to string error so can anyone help create the right code? here is my code below:

CONCATENATE($F{localId},LEFT(new SimpleDateFormat("MM", Locale.ENGLISH).format($F{person}.getDob())),new SimpleDateFormat("dd").format($F{person}.getDob()))

Thanks for any help.

jakehngo's picture
Joined: Aug 1 2017 - 7:32am
Last seen: 5 days 6 hours ago

0 Answers:

No answers yet
Feedback