Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Date Format
Date Format [message #782880] Tue, 24 January 2012 11:30 Go to next message
Michael Harless is currently offline Michael Harless
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 15:58 Go to previous messageGo to next message
Alessio Pollero is currently offline Alessio Pollero
Messages: 65
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 16:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
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...>?


Jason Weathersby

BIRT Exchange
Re: Date Format [message #783032 is a reply to message #782969] Tue, 24 January 2012 18:24 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
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>


Jason Weathersby

BIRT Exchange
Re: Date Format [message #783465 is a reply to message #783032] Wed, 25 January 2012 14:09 Go to previous message
Michael Harless is currently offline Michael Harless
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: Sun Apr 20 06:51:34 EDT 2014

Powered by FUDForum. Page generated in 0.01660 seconds