Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Date and Datetime report parameter conversion
jdevanoff
Question about date and datetime report parameters. Our dashboard report has from/to date report parameters (data type = date). This has a drill through to a summary report which has from/to datetime report parameters (data type = datetime). Assigning the dashboard reports from/to date parameter values to the summary report's from/to datetime parameters in the hyperlink definition caused a data type mismatch error. Using BirtDateTime.addSecond(params["To_Date"],86399) to set the time to 11:59:59 for the "to date" also resolved the data type issue. Ultimately I just used the same function and added 0 seconds to get the "From date" to work, but that seems like a workaround.
What is the correct/best way to convert the value of a date parameter into a valid value for a datetime parameter? And is there an actual Java data type that corresponds to these report parameter data types? For example, is the BIRT datetime data type actually a java.util.Date or java.util.Calendar or java.sql.Date? Hopefully that last part makes sense.
Find more posts tagged with
Comments
kclark
I've converted date to datetime the same way you described in the past without any problems. <a class='bbc_url' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/util/ParameterValidationUtil.html'>Here's
a link to the API doc</a> that shows Date and DateTime are both java.lang.String