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
- 123 Developer Announcements
- 54 Articles
- 153 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories