calculation with a date prompt

I am building a report against an oracle database that has a prompt for month(the format is ‘05-2004’ for May 2004). I need to extract the last day of the month supplied to derive a value in the report.


radeshina (BOB member since 2004-07-22)

do you have a calendar table, or some other table that contains all dates? You could do a select Max(date) from that table where the date is equal to the month and year that you want. Does this make sense?

something like this ----
Select Max(date)
From calendar
where to_date(date,‘MM-YYYY’) = to_date(@prompt,‘MM-YYYY’)


Justin Grimme :us: (BOB member since 2004-03-03)


last_day( to_date( @Prompt('What Month/Year?','A',,mono,free) ||'01', 'MM-YYYYDD') )

You essentially concatenate a day to turn their prompt into an actual date and then use an Oracle function to get the last day.


digpen :us: (BOB member since 2002-08-15)