Orchid FarmTech

Useful Tip: Date calculations for livestock farmers

Many of the Farm Assurance schemes for beef and lamb require you to keep purchased livestock on the holding for a minimum number of days before they can be sold under the scheme.  For a batch of animals, you’ll probably also want to quickly work out the age in months of each one.  This blog post suggests a few ways of quickly doing this on the farm computer

Use the Calculator that’s built into Windows

On occasion, you’ve probably used the Windows Calculator program that’s found under the Accessories listing from the main programs menu.  What you might not know is that there are an extended range of functions available, including the ability to work with dates.
First run the Calculator and then click on the View menu and then Date Calculation.

In the drop-down list there are two options:

 

Use a spreadsheet function

If you’re pretty handly with spreadsheets, you’ll probably know all about using functions including those for handling dates, but for those who aren’t familiar, read on.

This example uses Microsoft Excel, so if you are using another spreadsheet program, I’d advise you to check the help file for date functions. In the screen shot below, you’ll see I’ve got dates in the first two columns.  To get the difference between the two dates stated in days, click your mouse in a new column to the right of the second date and enter the following formula:

= B1 – A1

This subtracts the date in cell A1 from the date in cell B1 and shows the result as days in column C.  If you have many rows of dates relating to animal date, you can use the fill handle to copy the formula to the other rows.  To use the fill handle to copy the function to rows below, click on the cell containing the function and move your mouse over the bottom right corner, so that the mouse pointer changes to a black cross; now hold down the mouse button and drag downwards to copy the function to the required rows beneath.

If you want to show the difference as months, you’ll need a slightly more complicated function

=(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)

This function allows for the fact that the dates may span across one or more years.  The first part of the function gets the year difference (if any) and converts it to months, as below:

=(YEAR(B1)-YEAR(A1))*12

The second part of of the function gets the difference in the remaining months within the same calendar year.

MONTH(B1)-MONTH(A1)

The result is then simply added together.  Once you have checked the function is working correctly, simply use the spreadsheet fill handle to copy the function to other cells.

Use a specialist farm software package

The kind of date functions I’ve been talking about will be blended seamlessly into a specialised livestock recording package, showing on data grids and reports.  For farm assurance for beef and lamb it’s important to know animal ages and number of days on the holding.  Farm software packages should handle all this as standard.

If you’re new to using software for livestock recording, you can download our simple free BCMS CTS cattle data viewer program, which works with the “cattle on holding” data file, which can be downloaded from CTS Online.  If you’re interested in a full featured recording system for cattle of sheep, give Orchid a call today on 01536 443300 for a friendly no-obligation chat about your cattle recording needs.

 

Exit mobile version