Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Date Format
Date Format [message #782880] Tue, 24 January 2012 16:30 Go to next message
Michael Harless is currently offline Michael HarlessFriend
Messages: 14
Registered: January 2012
Junior Member
Hello,

I am new to BIRT. I have a report with a row that includes the following expression:
"ADDRESS: " + dataSetRow["ADDRESS"] + "; SSN: " + dataSetRow["SSN"] + "; COUNTY: " + dataSetRow["COUNTY"] + "; BIRTH DATE: " + dataSetRow["BIRTHDDATE"] + "; BIRTH PLACE: " + dataSetRow["BIRTHPLACE"]

The "BIRTHDDATE" field is formatted as yyyy-mm-dd. Can I change it to MM/dd/yy using <value-of format...>?
Re: Date Format [message #782969 is a reply to message #782880] Tue, 24 January 2012 20:58 Go to previous messageGo to next message
Alessio Pollero is currently offline Alessio PolleroFriend
Messages: 74
Registered: August 2011
Member
Yes, you can do it in this way :

<value-of format="MM/dd/yy">new Date()</value-of>
Re: Date Format [message #782996 is a reply to message #782880] Tue, 24 January 2012 21:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can do this if the report item is a text element not a data item and
you set its type to html for example:

<VALUE-OF format="MMM-dd-yy hh:mm" >new Date();</VALUE-OF>

If you want to do this in a data item use the Formatter functions. See
this blog post:

http://birtworld.blogspot.com/2011/02/birt-formatting-numbers-and-dates.html

Jason

On 1/24/2012 11:30 AM, Michael Harless wrote:
> Hello,
>
> I am new to BIRT. I have a report with a row that includes the following
> expression:
> "ADDRESS: " + dataSetRow["ADDRESS"] + "; SSN: " + dataSetRow["SSN"] + ";
> COUNTY: " + dataSetRow["COUNTY"] + "; BIRTH DATE: " +
> dataSetRow["BIRTHDDATE"] + "; BIRTH PLACE: " + dataSetRow["BIRTHPLACE"]
>
> The "BIRTHDDATE" field is formatted as yyyy-mm-dd. Can I change it to
> MM/dd/yy using <value-of format...>?
Re: Date Format [message #783032 is a reply to message #782969] Tue, 24 January 2012 23:24 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sorry I did not see that you responded.

On 1/24/2012 3:58 PM, Alessio Pollero wrote:
> Yes, you can do it in this way :
> <value-of format="MM/dd/yy">new Date()</value-of>
Re: Date Format [message #783465 is a reply to message #783032] Wed, 25 January 2012 19:09 Go to previous message
Michael Harless is currently offline Michael HarlessFriend
Messages: 14
Registered: January 2012
Junior Member
Thank you very much for your responses. I will give these a try.
Previous Topic:get dataSetRow value from client script
Next Topic:Hyperlinks created in xls file are invalid
Goto Forum:
  


Current Time: Fri Apr 26 08:48:39 GMT 2024

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

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

Back to the top