Custom Formatting - Issue with Months

Demonsguile

New Member
Joined
Oct 13, 2011
Messages
39
I'm trying to do something that I had thought simplistic, but the formatting of the result is causing me issues.
A1 = 1/8/2018 23:10
A2 = 1/8/2018 23:29

A3 contains the formula =A2-A1.
Then, I am formatting it with the following custom format: yy\y mm\m dd\d hh:mm:ss

I am expecting to see 00y 00m 00d 00:19:00 as only 19 minutes have elapsed between the two times.
What I'm getting is 00y 01m 00d 00:19:00. I have no idea where the 01 is coming from.

Any help would be appreciated.

Thank you.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi

Datetime in excel does not start at 0, it starts at year 1900

Ex. write 2 in a cell and format it as yyyy-mm-dd. You'll see 1900-01-02

You'd probably guessed it you you'd have used 4 year digit in your format: yyyy\y mm\m dd\d hh:mm:ss

Please try
 
Upvote 0

Forum statistics

Threads
1,216,218
Messages
6,129,571
Members
449,518
Latest member
srooney

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top