Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Date filtering(Date filtering)
Date filtering [message #1006107] Tue, 29 January 2013 17:22 Go to next message
Lauren Campbell is currently offline Lauren Campbell
Messages: 2
Registered: January 2013
Junior Member
Hello,

I am working to filter a database with BIRT. I would like to filter so that only items with today's month and year are outputted. For example, the label column has tons of labels. I only want to show the items with "ID-13-1". 13 stands for 2013 and 1 stands for January. In february, I want it to automatically only show "ID-13-2". To do this I was trying to do the match filter:

"ID-"
BirtDateTime.year(BirtDateTime.today())
"-"
BirtDateTime.month(BirtDateTime.today())



I thought that would work but it does not. It does work if I actually type in "ID-13-1" but I wanted it to automatically output by the current date. Does anyone know how to do this?
Re: Date filtering [message #1006123 is a reply to message #1006107] Tue, 29 January 2013 22:36 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1424
Registered: July 2009
Senior Member

Try this:

"ID-" + BirtDateTime.year(BirtDateTime.today()).toString().substr(2,2) + "-" + BirtDateTime.month(BirtDateTime.today())


Michael
Actuate – The BIRT Company™

BIRT Developer Center
Check out the new, free BIRT Viewer Toolkit
Previous Topic:Web Viewer Fails to Aggregate
Next Topic:Cannot start OSGI framework
Goto Forum:
  


Current Time: Thu Apr 24 14:53:33 EDT 2014

Powered by FUDForum. Page generated in 0.13781 seconds