If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

date prompt last date

Started by philelmousse, 03 Jan 2012 04:18:44 AM

Previous topic - Next topic

philelmousse

Hello,

I have a date prompt "date_from" and the last date has to be "today". Is it possible ?

HalfBloodPrince

yes try this
use this Filter

[Date_column] between ?From_date ? and SysDate()

absriram

I don't think you can set this value. What you can do is validate the date using javascript after the user has selected it.

Sriram.
http://www.cognosonsteroids.com

philelmousse

i found that script to set the default date as yesterday.

<script>
function subtractDay ()
{
var dtToday = new Date();
var dtYesterday = new Date( dtToday - 86400000 ); // 86400000 = 24 hours * 60 (minutes per hour) * 60 (seconds per minute) * 1000 (milliseconds per second)
var strYesterday = [dtYesterday.getUTCFullYear(), dtYesterday.getMonth()+1, dtYesterday.getDate()].join("-");
return strYesterday;
}
P_Date_from.setValue(subtractDay() );
</script>

P_Date_from is the name of my date prompt, but it doesnt work ?