Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » String To Date(String To Date Conversion)
icon8.gif  String To Date [message #1720989] Fri, 22 January 2016 10:38 Go to next message
JP Redro is currently offline JP RedroFriend
Messages: 181
Registered: July 2009
Location: India
Senior Member

Hi All,

I am using BIRT 4.3.1, and while developing report we have an issue with Date, which is in string.

We are using XML as data source and the date in one tag which consists of another strings too. We have to split the string and convert into date. below is the example string.

<REF>Cash: CC1183MC-10/14/15: 700.00</REF>

We have to get the 10/14/15 in the form of 14-OCT-2015. Please suggest me.

FYI,
I have tried with the following approach but no luck.

Step1: split computed column
(row["REFERENCE"].substr(10,Cool).replace(":","")

Step 2: converting into Date
importPackage( Packages.java.text );
new Date((row["Ref_Date"]), "dd-MMM-yyyy");
Result is : 1970-01-01

Actually we have to get it as 14-OCT-2015.

Thanks & Regards
JP


Thanks,
JP
Re: String To Date [message #1721420 is a reply to message #1720989] Wed, 27 January 2016 11:13 Go to previous message
JP Redro is currently offline JP RedroFriend
Messages: 181
Registered: July 2009
Location: India
Senior Member

Any suggestions please ...?

Thanks,
JP
Previous Topic:Even when the status of renderTask is success, content of html file is not complete
Next Topic:Last value of column in crosstab
Goto Forum:
  


Current Time: Thu Apr 25 18:10:14 GMT 2024

Powered by FUDForum. Page generated in 0.02443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top