August 21, 200025 yr I want to enter a date, add a set number of days, and produce another date. The second date must be searchable as a date. When I have tried this I have received a date serial that I have not figured how to convert back to a searchable date. I have used the date to text function and received acceptable formating, but then the date range search does not work as it is text (or the underlying serial.) Example: 4/7/00 is date A. Add seven days and get 4/14/00 in the second datefield. I can now search the second date field as a date. How do I do this.
August 21, 200025 yr quote: Originally posted by jacger: I want to enter a date, add a set number of days, and produce another date. The second date must be searchable as a date. When I have tried this I have received a date serial that I have not figured how to convert back to a searchable date. I have used the date to text function and received acceptable formating, but then the date range search does not work as it is text (or the underlying serial.) Example: 4/7/00 is date A. Add seven days and get 4/14/00 in the second datefield. I can now search the second date field as a date. How do I do this. You could create a calculated field called 'NewDate' as follows: NewDate = Date( Month( DateToConvert), Day( DateToConvert) + DaystoAdd, Year( DateToConvert)) Where 'DateToConvert' is the date that you want to convert and 'DaystoAdd' is the number of days you would like to add to 'Date'. Note: You could also use the Set Field function in a script to perform the calculation at a specified time so that 'NewDate' does not need to be a calculation field. I hope that this helps.
August 22, 200025 yr I think the problem is that the type of the result in you calculated date field is set to "number" rather than "date". Calculated date fields should appear as dates and be searchable. If the calculated field is set to "number", it won't appear as a date and adding arcane calculations won't solve the problem! -bd
Create an account or sign in to comment