Anh_Tran Posted September 18, 2002 Posted September 18, 2002 Dear All I would like to know if i have a field to enter (say Date1) and a field (say Date2) How can I find the records between two dates? or just enter into a field (Date2) ...I find all records before Date2? or just enter DAte1 ..I find all records after Date1 All by entering data in to Date1 and Date2 ...(not go search by ... in criteria) Thanks all
kenneth2k1 Posted September 18, 2002 Posted September 18, 2002 Hi: Sorry it may be just me, but I'm having a hard time understanding your english. If I understand your problem, then you need to find records that have a date range in a field. Then you want to set up two global date fields that will be the from...to date ranges (I will call g_FromDate and g_ToDate)?? If so, then you make a script like this: Enter Find Mode [ ] Insert Calculated Result [select, "DateField" , DateToText(g_FromDate) & "..." & DateToText(g_ToDate)] Perform Find [ ] If this is not what you are talking about, please clarify. Ken
kennedy Posted September 19, 2002 Posted September 19, 2002 If you are doing it manually, rather than by script, just put the following in the date field in Find mode: < 5/30/2002 > 7/4/2002 5/30/2002 ... 7/4/2002 HTH.
Anh_Tran Posted September 19, 2002 Author Posted September 19, 2002 Thanks kenny That is all I want ...and Now I understand the concept of it ... Thanks alot ...
Anh_Tran Posted September 19, 2002 Author Posted September 19, 2002 May I know why ...g_date is a date field ...why we need to type function Datetotext ? Just curious about it Thanks
kenneth2k1 Posted September 19, 2002 Posted September 19, 2002 I'm still a little shaky on this, but i'm guessing it is because when you put anything besides just a date (like the "..." which is text), it won't recognize it. Ken
Anh_Tran Posted September 19, 2002 Author Posted September 19, 2002 If the layout with only two global date fields ( not include Datefield) then it does not work ...but if I include Datefield in the layout then it works U know why is like that?
kenneth2k1 Posted September 19, 2002 Posted September 19, 2002 That is because the command Insert Calculated Result [ ] requires the field that the operation is being performed on to be on the current layout. Sorry I should have mentioned that. If you don't want the field on the layout, then you will have to put a Go To Layout [ ] command in the script. Ken
Anh_Tran Posted September 19, 2002 Author Posted September 19, 2002 Thanks alot Ken I think that because we use function Datetotext is when u type on the date field (as Date field) ...it is the text data entered (not a date data entered ). I experienced it because I change two global date field to two global text field then when i enter data on two global text field with format (mm/dd/yyy) . It works well. Sorry about my english ...hope u got my idea Thanks Ken
Recommended Posts
This topic is 8100 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