Normal Topic Searching Problem (Read 405 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Searching Problem
Jan 28th, 2014 at 1:36pm
Print Post Print Post  
Hello!
I use the following code  to search the data records from next month (February) I get the data records of month November! Why?

Thanks.
..
If vChoice = "Next Month"
{
If @Month(@ServerDate()) = 12
{
vBirthdayMonth = "]????/01/.."
}
Else
{
vBirthdayMonth = "]????/" + @Right("00" + @Month(@ServerDate()) + 1, 2) + "/.."
}
}
Else If vChoice = "This Month"
{
vBirthdayMonth = "]????/" + @Right("00" + @Month(@ServerDate()), 2) + "/.."
}
vData = @XLookupSourceListAll(@FN, vBirthdayMonth, "Customers!DOB", "DOB;DOB;FName;LName;Address;City;State;Zip;Email")
...
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Searching Problem
Reply #1 - Jan 28th, 2014 at 3:02pm
Print Post Print Post  
Hello Amor,

Since you want to add the 1 to the result of @Month() before adding it to the 00 you will want to put parenthesis around it.

Code
Select All
If @Month(@ServerDate()) = 12
{
vBirthdayMonth = "]????/01/.."
}
Else
{
vBirthdayMonth = "]????/" + @Right("00" + (@Month(@ServerDate()) + 1), 2) + "/.."
} 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Searching Problem
Reply #2 - Jan 28th, 2014 at 4:01pm
Print Post Print Post  
Thank you very much for your quick supports Ray.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged