Adjusting Date & Time Format

Sundance_Kid

Board Regular
Joined
Sep 2, 2017
Messages
155
Office Version
  1. 365
Platform
  1. Windows
Hi, I am downloading a file with data and I would like to add extra columns to show the details in a format I want.

It is the date & time.

I have attached an XL2BB file, columns B & C are showing what I currently get and columns E to H are what I want to get to, using the data from column B to get the data in columns E & F and from columns C to get the data in column G & H.

TimeIssueQuery.xlsx
ABCDEFGHI
1
2Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
36/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0518/06/202310:4118/06/202314:05
4
5
6
7
8
9
Sheet1
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
E3 Data TexttoColumns Date M/D/Y do not take the time
Format to your preference


T202306a.xlsm
ABCDEFGH
1
2Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
36/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0518-Jun-2310:41:05 AM18-Jun-2302:05:00 PM
4
5a
Cell Formulas
RangeFormula
F3F3=RIGHT(B3,11)+0
H3H3=RIGHT(C3,5)+0
 
Upvote 0
E3 Data TexttoColumns Date M/D/Y do not take the time
Format to your preference


T202306a.xlsm
ABCDEFGH
1
2Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
36/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0518-Jun-2310:41:05 AM18-Jun-2302:05:00 PM
4
5a
Cell Formulas
RangeFormula
F3F3=RIGHT(B3,11)+0
H3H3=RIGHT(C3,5)+0

Thanks for your reply, I nearly have it solved. Two issues:
1) For the Date, I have selected Text to Columns and Fixed Width but cannot figure out how you exclude the time portion when converting the date, when I tried to exclude it, it put the time into another column.
2) I have added a second time, see cell B4 but this does not convert with the formula. Ideally it should be showing 13:01 in cell F4.

Thanks
TimeIssueQuery.xlsx
BCDEFGH
2Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
36/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0510:4114:05
46/19/2023 1:01:06 PMWolverhampton 19.06.2023 15:40#VALUE!15:40
Sheet1 (2)
Cell Formulas
RangeFormula
F3:F4F3=RIGHT(B3,11)+0
H3:H4H3=RIGHT(C3,5)+0
 
Upvote 0
1. Use TextToColumns with selection B3
step 3
Date MDY
Location E4
click on the General heading select do not import
click on the General heading select do not import the am
Finish
2. Use the suggested formulas for the times
 
Upvote 0
format to your preference

T202306a.xlsm
ABCDEFGH
6Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
76/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0518-Jun-2310:41:05 AM02:05:00 PM
86/19/2023 1:01:06 PMWolverhampton 19.06.2023 15:4019-Jun-2301:01:06 PM03:40:00 PM
9
5a
Cell Formulas
RangeFormula
F7F7=RIGHT(B7,11)+0
F8F8=RIGHT(B8,10)+0
H7:H8H7=RIGHT(C7,5)+0
 
Upvote 0
More that you can experiment with

T202306a.xlsm
ABCDEFGH
6Bet Placed Date/TimeRace Date/TimeBet Placed DateBet Placed TimeRace DateRace Time
76/18/2023 10:41:05 AMDoncaster 18.06.2023 14:0518-Jun-2310:41 AM18-Jun-2302:05 PM
86/19/2023 1:01:06 PMWolverhampton 19.06.2023 15:4019-Jun-2301:01 PM19-Jun-2303:40 PM
5a
Cell Formulas
RangeFormula
F7:F8F7=--TEXTAFTER(B7," ")
G7:G8G7=--SUBSTITUTE(TEXTBEFORE(TEXTAFTER(C7," ")," "),".","-")
H7:H8H7=--TEXTAFTER(C7," ",2)
 
Upvote 0

Forum statistics

Threads
1,223,936
Messages
6,175,507
Members
452,650
Latest member
Tinfish

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