Jump to content
Changes to the Jaspersoft community edition download ×

date types in xml datasource

2005 IR Help

Recommended Posts

By: cablehead - cablehead

date types in xml datasource

2005-08-05 03:16

I'm trying to set the field type to java.util.Date for some date fields I have in a xml datasource, but can't get it to work.


Setting the field type to java.lang.Float or java.lang.Integer for numeric values in my data source works great.


The date field is in the format yyyy-MM-dd in the xml file:


<preparationDate type="xs:date">2005-08-25</preparationDate>


I've tried with and without the type="xs:date" declaration.


Loading the field as a string and then creating a variable with the expression:


new SimpleDateFormat("yyyy-MM-dd").parse($F{preparationDate})


works just fine.


Is it possible to set the field type to date for date values in xml datasources?


Any help is greatly appreciated,


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...