Skip to Content
0
Former Member
Oct 06, 2016 at 09:24 AM

Setting default DateTime value in Prompt

1032 Views

Dear All,

I have a report for which I need to enter two prompts with values during runtime:

1. Start Date

2. End Date

I want the above to be automatically populated as below:

1. Start Date - First DateTime of previous month - 9/1/2016 12:00:00 AM

2. End Date - Last DateTime of previous month - 9/30/2016 11:59:59 PM

I tried setting up the prompt with default value for the End Date using the following formula

RelativeDate(ToDate(FormatDate(CurrentDate();"yyyyMMdd");"yyyyMMdd");-DayNumberOfMonth(CurrentDate())+1-(1/86400))

But when I run the report the End Date is showing up as "9/30/2016 12:00:00 AM"

Please suggest.