TimeStampAdd - Syntax Help
633105Sep 18 2008 — edited Sep 22 2008Hi everyone, would someone please help me figuring the correct Syntax for TimeStampAdd function.
Here is my request.
I have a prompt on a date field Report_Date, where Format of Report_Date = Date. Ex: 07/19/2008.
I set the prompt type as Calendar and capture the user entered value in a presentation variable: pEndDate.
In the answers, I was trying to filter the Report_Date as
Report_Date >= TimeStampAdd(SQL_TSI_DAY, -6, @{pEndDate}{07/19/2008})
and Report_Date <= @{pEndDate}{07/19/2008}
Where, based on the other examples in the Forum, I am hoping {07/19/2008} is the default value.
I can understand that the problem is in the TimeStampAdd part as the function expect a TimeStamp. I am hoping the Calendar control sends the user selected value in the TimeStamp Format and I don't need to cast it again as TimeStamp in the Filter.
But all my guesses are wrong and was not lucky.
Please anyone who have done this kind of math, forward me your syntax or example.
Thanks
Sai