Solved extract days from date and time

January 22, 2013 at 09:49:03
Specs: Windows XP


can you suggest formula to extract number of days from the below:

9/21/1900 6:43:56 PM

it is 265 days..

Thanks


See More: extract days from date and time

Report •


#1
January 22, 2013 at 10:51:03

You can't extract a number of days from a single point in time.

To extract a number of days you need a start date and an end date.

Read up on the DATEDIF function to see if that is what you are looking for.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
January 22, 2013 at 11:08:37
✔ Best Answer

In the example given all you need to do is change the cell's format to "General". Since, according to Excel, time began in 1/1/1900 = 1 and 9/21/1900 = 265 and 1/21/2013 = 41295.

Your example will actually equate to 265.7805093. - the .7805 reflecting the time. If you want to get just the day irrespective of the time you can calculate that as =Int(A1) and, again, formt the cell as General.


The question is, why do you need this?


Report •

#3
January 23, 2013 at 03:39:27


Thanks Altek, INT formula works...

Report •

Related Solutions


Ask Question