Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Date shown in report different than in preview, How?
jshaw
<p>I have a problem with a Table not showing what the DataSet preview displays.</p>
<p> </p>
<p>From my database I obtain a date, 6/1/2009. I want to map it to the first date of the month, obviously the same value. Ah, "obviously". So, this is what i do:</p>
<p> </p>
<p>MyYear = Year(date) = 2009</p>
<p>MyMonth = Month(date) = 6</p>
<p>FirstOfMonth = Date( MyYear, MyMonth-1, 1) ' -1 since month is 0 based in date()</p>
<p> </p>
<p>In the Preview i see for the initial date plus these 3 values is:</p>
<p> </p>
<p>"6/1/2009 12:00am" 2009 6 "6/1/2009 12:00am".</p>
<p> </p>
<p>Just what I want. Now i place these same four fields in a table in a report, and i see</p>
<p> </p>
<p>"6/1/2009 12:00am" 2009 <strong> 5 </strong> "<strong>5</strong>/1/2009 <strong>9</strong>:00am"</p>
<p> </p>
<p>May!, How can that be?</p>
<p>Let's turn on some high fidelity date formatting, so what i really get in the table is </p>
<p> </p>
<p>"6/1/2009 12:00am GMT +2" 2009 5 "5/1/2009 9:00 AM GMT +2:00" </p>
<p> </p>
<p>Now, I am sitting in Europe running this, and the data is coming originally from a Db in the USA. So apparently the preview doesn't see a time zone difference but the report does and interposes itself between the data and the user - scary!!</p>
<p> </p>
<p>It looks like i will need to do the date arithmetic in the database rather than in Actuate, but perhaps others have found a way to get around it?</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>What version of BIRT are you using?</p>
<p>Are you doing this in a computed column?</p>
<p>Can you provide a sample report that demonstrates the behavior you have described?</p>