er.navneetverma Posted February 19, 2019 Share Posted February 19, 2019 Hi Everyone,I need to convert below crystal report formula in Jasper Studio. Please help. dim ary() as string, formatOK as booleanformatOK = trueary = split({?dte_book_dt}, "/")if ubound(ary) <> 3 then formatOK = falseelseif not(isnumeric(ary(1)) and isnumeric(ary(2)) and isnumeric(ary(3))) then formatOK = falseend ifif formatOK = true then if {?dte_book_dt} = "" or isnull({?dte_book_dt}) then formula = "" else formula = totext(datevalue(tonumber(ary(3)),tonumber(ary(2)),tonumber(ary(1))),"dd-MMM-yyyy") end ifelse formula = "Date Format should be in DD/MM/YYYY"end if ThanksNavneet Link to comment Share on other sites More sharing options...
hozawa Posted February 19, 2019 Share Posted February 19, 2019 JasperReports only supports 1 line in expression. Link to comment Share on other sites More sharing options...
prusyn Posted February 20, 2019 Share Posted February 20, 2019 Not being familar with crystal reports, this is not much helpful. Can you specify what are you trying to acheive? As I understand you are trying to build date out of three integers. Is that correct? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now