Marcidee
Marcidee

Reputation: 17

How to deduct date and time in one cell

Please can you tell me if there is a formula / code that will deduct date and time if date and time are in the same cell.

ie

31/07/2019 15:00:00 less 01/08/2019 16:00:00 - using format (dd/mm/yyyyy hh:mm)

Thank you Marc

Upvotes: 0

Views: 96

Answers (1)

Mark S.
Mark S.

Reputation: 2584

If the two dates you're subtracting are in the same cell, I would separate them with Text to Columns, reformat to make sure they are both date.

Then (and if they are in different columns) you can just do

= 1/8/2019 - 31/7/2019 since and this will give you the difference. You can also use Datedif

Upvotes: 1

Related Questions