# Office 365 >  >  How to calculate time difference in Excel

## feroz763

Dear Experts please help, Answer should be in E2, I am using excel 2013... thanks in advanceClipboard02.jpg

----------


## sandy666

Result of what? Difference of what?

----------


## feroz763

If i enter time in a2 example 05:00 am result should be *02:30 am* ( Two hour and thirty minutes difference )thank you all in advance.

----------


## FDibbins

What you need to understand about dates and times in excel is…

a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date.  So, for instance, today (Sat 03 Feb 2018) is actually 43134

Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

So to do what you want, use something like...
=A2-2.5/24
or
=A2-TIME(2,30,0)

----------


## sandy666

It doesn't work: =A2-TIME(Two hour and thirty minutes)  :EEK!:   :Roll Eyes (Sarcastic):   :Wink:

----------


## FDibbins

> It doesn't work: =A2-TIME(Two hour and thirty minutes)



Perhaps you entered it wrong?

O
P

32
5:00 AM


33
2:30 AM
=O32-2.5/24

34
2:30 AM
=O32-TIME(2,30,0)




And please keep your eye-rolls to youself

----------


## sandy666

:Smilie:  :Smilie:  :Smilie:  :Smilie: 
@Ford,
It was joke  :Smilie: 
but first I should say this is Excel not a Word

----------


## feroz763

Hi sir, This is what i am getting in excel 2013 - #VALUE! 
when i enter this formulas =A2-2.5/24
or
=A2-TIME(2,30,0)

----------


## sandy666

maybe use: =A2-TIME(2;30;0) (_because of local settings_)

----------


## FDibbins

> @Ford,
> It was joke 
> but first I should say this is Excel not a Word



OK  :Smilie: 

Also, I saw no reference to Word, am I missing something here?  :Wink:

----------


## sandy666

Excel: 1.293
Word: one thousand two hundred and ninety-three

----------


## feroz763

Guys please help.

----------


## sandy666

Did you read post#9?
or
attach excel file with your problem

----------


## feroz763

Clipboard02.jpg Answer should be in E2, I am using excel 2013... thanks in advance

----------


## sandy666

this is not an Excel file

Pictures are useless. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc. Additionally, due to how some browsers behave, many of our members cannot see uploaded pictures/images. Please do not take this route.
Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.
Include in the attachment any code you're currently using (whether it works or not) and an After of what you wish the output to be.


To attach an Excel file to your post, *desensitize* data    remeber that your example should *reflect structure and type* of data    click *Go Advanced*,    scroll down until you see *Manage Attachments*,    click that and select *Browse*,    select your file and click *Open*,    click *Upload* and you will see your attachment below Upload Files from a website    click *Close this window*,    click *Submit* reply
After that you should see attachment in your post

----------


## FDibbins

If you tried any of the suggestions, and they didnt work, what was wrong?
If you didnt try them yet, then please do so.

Either way, post a sample workbook, not a pic, please

----------


## sandy666

alternatively you can use PowerQuery (add-in for Ex2013)



```
Please Login or Register  to view this content.
```

----------


## feroz763

I have attached excel file please check... thanks

----------


## davsth

All the suggestions offered work however now you have introduced another column with the 2:30 in. Which is why posting your workbook to start with would have saved a lot of time

=A2+B2/24

----------

