Newbies gac_100 Posted July 30, 2013 Newbies Posted July 30, 2013 Hi I am trying to use Set Variable to capture a date. Then I want to take that date, add one day to it and perform a find for a date range. My script looks like this Set Variable [$$Inv_date; Value:Inventory_Date::LastUpdate] Enter Find Mode Set Field [Date; ($$Inv_date)+1 &"..."& g_search_date] Perform Find It works some of the time but not consistently and I think the problem is that when I defined the variable it says "calculation result must be text" How do I get it to say "calculation result must be date"? Thanks in advance
Fitch Posted July 30, 2013 Posted July 30, 2013 Variables don't let you choose a result type. There has been some discussion of how they behave under the hood -- sometimes they seem to retain their data type, but it's not always clear why. You might try adding the +1 when you set the variable, and/or do this: Set Field [Date; GetAsDate($$Inv_date)+1 &"..."& g_search_date]
Newbies gac_100 Posted July 31, 2013 Author Newbies Posted July 31, 2013 Thanks Fitch! Moved the +1 to the variable definition and it seems to be working
Recommended Posts
This topic is 4406 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now