Time difference between date taken and time values

anmac1789

New Member
Joined
Dec 6, 2020
Messages
43
Office Version
  1. 365
Platform
  1. Windows
I have a question regarding using textsplit, match and exact functions. So, Im trying to find the time difference in seconds from the time portion of date taken and the time created, time modified and time accessed. I've tried using match, exact but somehow it doesn't seem to work. Please check my code. Thank you.


time.xlsx
ABCDEFGHIJKL
1NameSizeDay CreatedDay ModifiedDay AccessedTime CreatedTime ModifiedTime AccessedDate CreatedDate ModifiedDate AccessedDate Taken
220220727_165105.jpg673430727 Jul 2227 Jul 2227 Jul 2216:51:0516:51:0616:51:06 2022-07-27 16:51:05 2022-07-27 16:51:062022-07-27 16:51:062022-07-27 16:51:05
320220727_165105.jpg673430727 Jul 2227 Jul 2227 Jul 2216:51:0516:51:0516:51:052022-07-27 16:51:052022-07-27 16:51:052022-07-27 16:51:052022-07-27 16:51:05
4
5=TEXTSPLIT(L2," ")
62022-07-2716:51:0501
7
8=EXACT(B6,B6)
9TRUE
10
11=MATCH($G2,$G$2:$G$3,0)
121
132
Sheet1
Cell Formulas
RangeFormula
A6:B6A6=TEXTSPLIT(L2," ")
E6E6=TEXT(G2-F2,"[ss]")
A9A9=EXACT(B6,B6)
A12:A13A12=MATCH($G2,$G$2:$G$3,0)
Dynamic array formulas.
 
so is recognised as a date and can be formatted into any format

i suspect this is the issue
When I type 27/07/2022 04:51 into a cell, I only get that text,
you are entering a date format

27/07/2022 - but your excel system is expecting YYYY-MM-DD
and so it assumes its TEXT and NOT a number

like my system does when trying to enter MM/DD/YY
if i enter
10/19/22 - it right justifies and nolonger a real date BUT text - because excel is expecting a MONTH and 19 is NOT a month and so it must be a date
like if i wanted to enter 1st June 22
01/07/22
but if i entered it in that format assuming it should show 7th Jan - as a US date MM/DD
it will be seen as a date - BUT the wrong date

see this a lot with US systems outputing into excel - well a lot of dates are real - BUT wrong and others are TEXT
a couple of questions even yesterday on the forum because of that issue

so if its seen as text , as i showed
TEXTSPLIT works
BUT not when its entered and recognised as a date

I dont feel i have explained that well
that was a bit wordy and confusing not gonna lie lol
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,215,701
Messages
6,126,297
Members
449,308
Latest member
VerifiedBleachersAttendee

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