Convert Date Format

Warrior Golf

New Member
Joined
Jan 2, 2013
Messages
33
Hi in cell b1 I have "Tue, 10 Apr 2018 09:03:05". The only data I am interested in is the time but would like to change it from military time to AM/PM. How can I keep the time only and eliminate all other data? Please help. Thanks!

<colgroup><col width="349"></colgroup><tbody>
[TD="class: xl63, width: 349"][/TD]

</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

This is one way, format cell as Time in the AM/PM format:


Excel 2010
BCD
1Tue, 10 Apr 2018 19:03:057:03:05 PM
Sheet2
Cell Formulas
RangeFormula
D1=TIMEVALUE(RIGHT(B1,8))
 
Last edited:
Upvote 0
Hi.

Do you understand how Excel handles dates and times ?

Is the value in B1 entered as a text string, or as a number ?
Put this formula into a cell somewhere . . .
=ISTEXT(B1)
If this returns TRUE, then you've got a text string.
If this returns FALSE, then you've got a number.
Don't worry if b1 is a formula, this could return either a text string or a number and the fact that it's a formula doesn't really matter.

If you've got a number, then it's simple, just apply a different format, such as a TIME format - there is most likely an already existing standard format that will give you what you want.

If you've got text instead of a number, post back, that's solvable too.
 
Upvote 0
Hi,

This is one way, format cell as Time in the AM/PM format:

Excel 2010
BCD
Tue, 10 Apr 2018 19:03:05

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"]7:03:05 PM[/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D1[/TH]
[TD="align: left"]=TIMEVALUE(RIGHT(B1,8))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Worked perfect thanks!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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