Home
Analytics
Using DateAdd in the select section
Suzukidave
We are currently using Actuate v10 BIRT report design and I am trying to utilize a DateAdd in the select section (Select DateAdd('d',3,NOW()) ). BIRT does not acknowledge DateAdd.
Find more posts tagged with
Comments
mwilliams
Does the database driver you have installed work with this function? Can you also explain more about what you're trying to do with the dateAdd? Is this something you could do in your beforeOpen method using script and then edit your query that way?
Jenkinsj5
As this is the only entry for DateAdd and BIRT on the forum - BIRT 4.2 does allow DateAdd<br />
<br />
It was not working for me, but when I tried to recreate the problem using the classic models data base I realized I had an error in my SQL. Once my SQL was corrected it worked fine, though the SQL word DATEADD is not turned purple, like other SQL words. <br />
<br />
This returns the last 2 hours of records, where OPEN_TIME is the time stamp on my record.<br />
<br />
<span style='color: #800080'>WHERE</span> OPEN_TIME >= DateAdd(hh,-2,GetDate())
bgbaird
In SQL Server(2000 and 2008) and SyBase 12.5, my syntax is "dateadd(dd,-1,{DATE})"
Good link here:
http://www.w3schools.com/sql/func_dateadd.asp
Brian