system
July 14, 2011, 8:32pm
1
I’m trying to set up a variable that gives dates that are <= 30 days from the current date. But I get an error when I try it. Can someone help me with this? I can set up something that goes current date - 30, but not <=
bull76 (BOB member since 2010-04-08)
system
July 14, 2011, 8:37pm
2
Hi,
Create a variable which shows the difference between given date and current date and use an If then Else
=If(Daysbetween([Given Date];[Currentdate])<=30) Then "" Else ""
Hope that helps
M H Mohammed (BOB member since 2010-06-16)
system
July 15, 2011, 3:27am
3
A small suggestion - Hope [Given Date] is in Date format, if not you need to convert it.
aniketp (BOB member since 2007-10-05)
system
July 15, 2011, 9:05am
4
Are you trying to dynamically derive all the dates that falls between the Current date and Current Date - 30 days?
Or do you have a date object against which you want to validate this?
jprasanthram (BOB member since 2010-12-10)
system
July 15, 2011, 1:14pm
5
What error are you getting exactly??
tarunteotia (BOB member since 2011-02-16)
system
July 15, 2011, 2:05pm
6
Thanks for the help. After speaking with the requestor, she wants me to take the end date (prompted) and add 45 days to that and display that date in the report
Ex.
If I enter the prompted dates ‘begin date’ 01/01/2011 and ‘end date’ 03/31/2011
I want to display a date 45 days from the 3/31/2011 date entered.
Is that possible?
bull76 (BOB member since 2010-04-08)
system
July 15, 2011, 2:10pm
7
Thanks for the help. After speaking with the requestor, she wants me to take the end date (prompted) and add 45 days to that and display that date in the report
Ex.
If I enter the prompted dates ‘begin date’ 01/01/2011 and ‘end date’ 03/31/2011
I want to display a date 45 days from the 3/31/2011 date entered.
Is that possible?
Look at the UserResponse() and RelativeDate Funtions. You will also have to turn the string returned by UserResponse into a “proper” date.
Mak 1 (BOB member since 2005-01-06)
system
July 15, 2011, 2:20pm
8
Hi,
This would be the date after adding 45 days to the date entered
=RelativeDate(ToDate(UserResponse("Enter Date:");"");45)
M H Mohammed (BOB member since 2010-06-16)
system
July 18, 2011, 3:50am
9
Or you can try this, sometimes when you select from Calendar dates, you get timestamo too…
=RelativeDate(ToDate(Trim(If(Pos(UserResponse("End Date");" ") = 0;Substr(UserResponse("End Date");1;10);Substr(UserResponse("End Date");1;Pos(UserResponse("End Date");" ") )));"MM/dd/yyyy");45)
aniketp (BOB member since 2007-10-05)