Click to See Complete Forum and Search --> : Date Formula Needed


thadoc35
November 13th, 2008, 04:55 PM
I have been tasked with an assignment that compares people that visit our company. Here is what I am having trouble with, i'm supposed to identify that people that come in, and then come back in within 72 hours. I can't seem to come up with a date formula that will make this happen. I have it grouped by everyone that has visited and the dates they did, but manually doing 65000 records seems cumbersome if there is an easier way. Can anyone help please?

Rodders
November 14th, 2008, 04:18 AM
Unless I am mistaken, this sounds like you want the date difference?
You can use the formula:

DATEDIFF("{TimeInterval}",{StartDate}, {EndDate})

Not sure if this will work for DateTime fields, but there should be a similar way.

thadoc35
November 18th, 2008, 11:56 AM
That seems like almost the exact formula i need to use. However it's not quite specific enough. Or i guessi should say general enough.
I dont know the tart and end date that will be within the 72 hour intervals.

ex. Someone could come in Dec 10th and return Dec 11th, as well someone could come in Feb 2 and return Feb 4th. But I wont know these dates.

So if there is a formula that can be made up that basically states "any time periods within a year that fall within 72 hours or 3 days of each other. then display"

This seems hard to explain but I hope that helps.

jawadhashmi
November 24th, 2008, 12:40 AM
thadoc35,

You might be pulling these two dates from some where in the DB. On first try show the last two visits dates for a person on the report.

in second phase show the difference between the visits.

suppress the section/record for the person whose visit difference is not matching your criteria also you can put this is record selection formula.