Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Formatting date in text blurb
al91206
Hi,
I dropped a data item onto my report - which is composed of some text - the beginning date and the ending date.
Here is the code:
"Posted dates between "+dataSetRow["begdate"]+" and "+dataSetRow["endddate"]
It comes out: Posted dates between 2009-09-01 and 2009-09-28
The date is coming out YYYY-MM-DD (as shown above) and I would like to be able to format it to something different. Is this possible?
Thanks,
Al
Find more posts tagged with
Comments
rextency
Al,
Seems these work with Date or Date Time data, but just use the BIRT Functions in the Expression Builder
Data:
Header1,Header2,Header3,Header4,Header5,Header6
1,MyString01,2,5,2009-09-01,2009-10-10
Expression:
BirtDateTime.weekDay(row["Header5"],4)
Result:
Tuesday
al91206
Thanks for the quick reply - this works very well - end result is this:
"Posted dates between "+ BirtDateTime.month(dataSetRow["begdate"],3) +" "+
BirtDateTime.day(dataSetRow["begdate"])+", "+BirtDateTime.year(dataSetRow["begdate")
Result = Sep 30, 2009
rextency
Btw, I didn't want to use dynamic text element for formatting a date before, in a cover page. I found this which is very handy
<value-of format="dd/MM/yyyy">new Date()</value-of>