2 Replies Latest reply on Sep 25, 2016 9:40 PM by Chaz

# How to Calculate the Days Held for a stock transaction?

I am an investor, and want to calculate
the number of days a stock has been held before it's sold. I've tried
several calculations I found on the web, and found non worked for the
number of days held calculation.  Date Bought - Date Sold = Days
Held.  When I try this calculation I get an unusual high number of
days in thousands and these days are usually negative numbers.  Can
anyone help?

• ###### 1. Re: How to Calculate the Days Held for a stock transaction?

HI Chaz,

Have you checked the Field Type you are using for Date Bought, Date Sold, and Days Held?

Date Bought and Date Sold should be set as Date Fields. If they are set to Text fields [which still accepts dates, and is the default Type when adding a field], you'll find the Days Held field will be large numbers.

E.g. Should be:

Date Brought = 26/11/2015

Date Sold = 27/02/2016

Days = 93

But if Date Brought and Date Sold are Text, then Days will equal 27,022,016 - 26,112,015, giving you a total of 910,001. In other words, the Date separator gets ignored.

1 of 1 people found this helpful
• ###### 2. Re: How to Calculate the Days Held for a stock transaction?

I used a number field instead of Date Field.  Thanks for the reply.  Very helpful and it works