Date change from timestamp

Huckledebuck

New Member
Joined
Nov 11, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello everyone!

I'm trying to figure out how to display the date from a time stamp. However, I need the date to change to the previous day if it is less than 07:00.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
does this work for you

Book1
AB
211/1/21 1:0010/31/21 1:00
311/2/21 2:0011/1/21 2:00
411/3/21 3:0011/2/21 3:00
511/4/21 4:0011/3/21 4:00
611/5/21 5:0011/4/21 5:00
711/6/21 6:0011/5/21 6:00
811/7/21 7:0011/6/21 7:00
911/8/21 8:0011/8/21 8:00
1011/9/21 9:0011/9/21 9:00
1111/10/21 10:0011/10/21 10:00
1211/11/21 11:0011/11/21 11:00
1311/12/21 12:0011/12/21 12:00
1411/13/21 13:0011/13/21 13:00
1511/14/21 14:0011/14/21 14:00
1611/15/21 15:0011/15/21 15:00
1711/16/21 16:0011/16/21 16:00
1811/17/21 17:0011/17/21 17:00
1911/18/21 18:0011/18/21 18:00
2011/19/21 19:0011/19/21 19:00
2111/20/21 20:0011/20/21 20:00
2211/21/21 21:0011/21/21 21:00
2311/22/21 22:0011/22/21 22:00
2411/23/21 23:0011/23/21 23:00
Sheet1
Cell Formulas
RangeFormula
B2:B24B2=IF(TIME(HOUR(A2),MINUTE(A2),SECOND(A2))<=TIMEVALUE("07:00"),A2-1,A2)
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,697
Members
449,117
Latest member
Aaagu

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