Hi All,
in my report having From and To date prompt.
I need to set it as Jul 1 and Jun 30 of the current fiscal year(2009)
eg:
from date shud be set to Jul 1,2008 and to date set to Jun 30, 2009
Any javasript to set this date.
thanks
Assuming the date prompts names are FROM and TO:
FROM:
<script>
function FiscalYearStart()
{
var strStartFiscal = [new Date().getUTCFullYear()-1,7,30].join("-");
return strStartFiscal;
}
pickerControlPrompt[b]FROM[/b].setValue(FiscalYearStart() );
</script>
TO:
<script>
function FiscalYearEnd()
{
var strEndFiscal = [new Date().getUTCFullYear(),6,1].join("-");
return strEndFiscal;
}
pickerControlPrompt[b]TO[/b].setValue(FiscalYearEnd() );
</script>