Hi,
I have a big problem with Date function in Excel.
I need to find out the difference between two date.
Suppose, one baby was born in 10th Feb 2000.
What will be his age now (Yr- Month-Day).
Please help.
8 2684
Heya, Tapan.
I'm going to go ahead and move this thread to the Windows forum, where one of our resident Experts will be more likely to see it.
Heya, Tapan.
I'm going to go ahead and move this thread to the Windows forum, where one of our resident Experts will be more likely to see it.
Sorry, pbmods. The Windows Forum is in the Sys/Admin Group. Excel questions have been relegated to the Misc. Q.s Area. I'm moving it back there.
Sorry, pbmods. The Windows Forum is in the Sys/Admin Group. Excel questions have been relegated to the Misc. Q.s Area. I'm moving it back there.
Very well then. We'll keep Office-related q's in Misc.
Tapan, take a look at the date and time functions in Excel.
Hi,
I have gone through all Date Functions available in Excel.
But I did not get my answer.
The Year Function shows no. of Years in between two dates.
The Month Function shows no. of Months in between two dates.
The Day Function shows no. of Days in between two dates.
But I unable to get the Difference between two Dates expressed in Yr.-Month- Date.
Example:
Date 1=10th Feb 2000
Date 2=9th July 2007
Difference = 7 yrs. 4 Months 29 Days
I did not find any formula to solve this problem.
Heya, Tapan.
=YEAR(A2)-YEAR(A1)-IF(OR(MONTH(A2)<MONTH(A1),AND(MONTH(A2)=MONTH(A1),
DAY(A2)<DAY(A1))),1,0)&" years, "&MONTH(A2)-MONTH(A1)+IF(AND(MONTH(A2)
<=MONTH(A1),DAY(A2)<DAY(A1)),11,IF(AND(MONTH(A2)<M ONTH(A1),DAY(A2)
>=DAY(A1)),12,IF(AND(MONTH(A2)>MONTH(A1),DAY(A2)<D AY(A1)),-1)))&" months,
"&A2-DATE(YEAR(A2),MONTH(A2)-IF(DAY(A2)<DAY(A1),1,0),DAY(A1))&" days"
This is mostly what you need. Play around with it until you get the result you're looking for.
Try =((YEAR(A2-A1) - 1900) & " Years, " & (MONTH(A2-A1)) & " months, " & (DAY(A2-A1)) & " days")
Where A1 is the first date and A2 is the second date
Hi,
conorb66
Your answer is showing 1 months extra.
and the answer which is taken from MSDN quite ok but
this formula is showing certain discripency when there will be
a leap year.
Otherwise everything is fine.
Very very thanks for your co-operation.
Hi,
I have a big problem with Date function in Excel.
I need to find out the difference between two date.
Suppose, one baby was born in 10th Feb 2000.
What will be his age now (Yr- Month-Day).
Please help.
Simply type date of birth and then subtract it on the current system date. format cell address to date.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Frank |
last post by:
For my website i would like to display the age of my son in years,
months, days and hours.
For now i manage to get a result for totals. Like the total number of
days.
This is the beginning:
...
|
by: jamesyreid |
last post by:
Hi,
I'm really sorry to post this as I know it must have been asked
countless times before, but I can't find an answer anywhere.
Does anyone have a snippet of JavaScript code I could borrow...
|
by: bbawa1 |
last post by:
Hi,
I have a table which has a field ItemsReceived of type datetime. I
have a grid view which has two columns.
In first column i have to show the data from field ItemsReceived and
in second...
|
by: Julius |
last post by:
Hej dudes,
I need to calc the difference between two timestamps / dates ...
For example what i need to calculate:
Date 1: 2007.11.06 - 20:13:04
Date 2: 2007.11.07 - 21:13:04
Difference:...
|
by: student4lifer |
last post by:
Hello,
I have 2 time fields dynamically generated in format "m/d/y H:m".
Could someone show me a good function to calculate the time interval
difference in minutes? I played with strtotime() but...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |