Convert string with date text to date format in BIRT table
pratikgala
Member
<p>I have a Date which I retrieve as a string "Dec 20 2007" from my front end app and insert into a BIRT table.</p>
<p> </p>
<p>Since the data type for this field is set as "Type: String" when I convert it to Date the table breaks and no data is visible in the Table. </p>
<p> </p>
<p>My ultimate goal is to sort the table by Date. </p>
<p> </p>
<p>Any solution to convert the string which is "Dec 20 2004" to date format in BIRT table. </p>
<p> </p>
<p>Thanks. </p>
<p> </p>
<p> </p>
<p> </p>
<p>Since the data type for this field is set as "Type: String" when I convert it to Date the table breaks and no data is visible in the Table. </p>
<p> </p>
<p>My ultimate goal is to sort the table by Date. </p>
<p> </p>
<p>Any solution to convert the string which is "Dec 20 2004" to date format in BIRT table. </p>
<p> </p>
<p>Thanks. </p>
<p> </p>
<p> </p>
0
Comments
-
<p>is it always in format MMM dd yyyy?</p>
0 -
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="137059" data-time="1434126432">
<div>
<p>is it always in format MMM dd yyyy?</p>
</div>
</blockquote>
<p>Yes it is always in that format. </p>0 -
<p>Is is very simple, simply create a new data item with an expression like this:</p>
<pre class="_prettyXprint">
new Date(row["String Date"])</pre>
<p>Then you can sort on the new data binding. See attached example.</p>
1 -
<p>thanks this works beautifully, thanks genius</p>
0 -
<p>Not a genius just experienced :-)</p>
0
Categories
- All Categories
- 117 Developer Announcements
- 52 Articles
- 145 General Questions
- 132 Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 8.9K Extended ECM
- 912 Cloud Fax and Notifications
- 81 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 165 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 4 XM Fax