Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time In Care 1

Status
Not open for further replies.

Ray M

Technical User
Aug 5, 2019
6
0
0
US
I don't know if this will make sense to folks. I work for an animal shelter and the software we use tracks an animal's impound and outcome (the outcome is usually Adoption but can vary.) My issue is I need to track an animal's time in care (or the time it either spent at our shelter or in one of our foster homes). (Time in care is defined as everything from intake until Adoption (fostering is considered as being in our care as they are our foster homes.) The wrinkle is that each time an animal is sent into foster and returned from foster is represented in separate impound.

I need to count the number of days so I can use it to figure out costs.
 
You need to explain how your data is recorded in your database. The easiest way would be to show some sample data with fields names, e.g.,

Name InDate OutDate
Fido 7-31-19 8-3-19
Fido 8-5-19 ——

Show all fields that are relevant to the calculation.

-LB
 
Intake date, intake type, outcome date, outcome type (all in one kennel impound record)
Intake date, intake type, outcome date, outcome type (all in a 2nd kennel impound record) - the 2nd kennel impound record is generated when the animal comes back from the original outcome

for example:
dog a is impounded 01/01/2019 (intake date) and sent into foster care (outcome type) on 01/31/2019
dog a comes back from foster care on 02/15/2019 (necessitating a 2nd impound record) and then adopted 03/01/2019 (2nd impound record's outcome date)

**How long was dog a in our care (as time in foster care and in kennel both count)? This is a straight-forward example as dog a could have been in foster care multiple times with different people.

Does that help or just muddy the waters further?
 
Insert a group on DogID and then create a formula {@incare}:

Datediff(“d”,intakedate,outcomedate)

Then insert a sum on {@incare} at the group level.

-LB
 
I just ran into a situation where an animal was in foster (3) separate times before being adopted. It's the date math on multiple intakes that is tripping me up.

The time in care tallying would end when the outcome type is "adoption".
 
But that doesn’t matter. Did you try what I suggested? It should work with any number of care instances. There should be one detail row for each care instance. If this isn’t the case, please show some sample data that shows how the data displays in the detail section.

-LB
 
I had the syntax wrong in the incare formula. Thank you for your patience.

Have an awesome day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top