×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Time In Care

Time In Care

Time In Care

(OP)
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.

RE: Time In Care

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

RE: Time In Care

(OP)
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?

RE: Time In Care

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

RE: Time In Care

(OP)
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".

RE: Time In Care

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

RE: Time In Care

(OP)
I had the syntax wrong in the incare formula. Thank you for your patience.

Have an awesome day!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close