sirtemplar Posted July 13, 2006 Posted July 13, 2006 hello, i have been trying to do this but still in vain. i have a field(date format) with the date of expiration. what i want is to have a script which will find data and show them on screen of those expiring 30 days from current date. any help. thank you
Fitch Posted July 13, 2006 Posted July 13, 2006 Try this script: Enter Find Mode[] Set field [exp date; Get ( CurrentDate ) + 30 ] Perform Find[]
sirtemplar Posted July 13, 2006 Author Posted July 13, 2006 thanks for the reply. i tried what you suggested: Set field [ ("EXPIRATION"); Get ( CurrentDate ) + 30 ] it is giving me an error "an operator is expected here" help!
Raybaudi Posted July 13, 2006 Posted July 13, 2006 Hi you have to enter the name of your field, without (" and "), something like: Set field [ YourTable::EXPIRATION; Get ( CurrentDate ) + 30 ]
sirtemplar Posted July 13, 2006 Author Posted July 13, 2006 i am sorry for the confusion. the above script works (latest post). but what i really want is all data that will expire in 30 days from present day and not only those expiring exactly 30 days from present day which the present script does. thanks again.
Lee Smith Posted July 13, 2006 Posted July 13, 2006 You will need to use global fields to enter the start and End dates for the Range, and then perform a find on that range. g_start (text, global storage) g_End (text, global storage) Script is: Set Field [ YourFile::g_Start; Get ( CurrentDate ) ] Set Field [ YourFile::g_End; Get ( CurrentDate ) + 30 ] Enter Find Mode [ ] Set Field [ YourFile::Expiration; YourFile::g_Start & "..." & YourFile::g_End ] Perform Find [ ] HTH Lee
comment Posted July 13, 2006 Posted July 13, 2006 Or simply: Enter Find Mode [ ] Set Field [ YourTable::ExpirationDate ; Get ( CurrentDate ) & ".." & Get ( CurrentDate ) + 30 ] Perform Find [ ]
Recommended Posts
This topic is 6709 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