Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to quickly determine or extract AM and PM from DateTime string in Excel?

Here is a sheet which contains a list of datetime data, and you cannot quickly determine the datetime is in AM or PM. In this case, I introduce a way to extract the AM or PM from the datetime to the next column to help you easily determine the datetime.
doc extract am pm 1

Extract AM and PM from Datetime


Extract AM and PM from Datetime

With one simple formula, you can quickly extract and determine AM or PM from the datetime.

Select a cell next to the datetime you want to use, type this formula =IF(MOD(A2,1)>0.5,"PM","AM"), press Enter key, and drag the autofill handle over cells you want to work. See screenshot:

doc extract am pm 2
doc arrow down
doc extract am pm 3

Exctract Email Address 

Kutools for Excel's Extract Email Address utility can quickly extract all email addresses from text strings to another location.
doc extract email address

Relative Articles



Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    dinesh shah · 11 months ago
    Hi,
    I have date string as shown above in my project. I need two catagories AM or PM Shifts of working. But the situation is AM should be upto 12:30 and PM is after 12:30 to rest of the time. Two different person works in this time frame with two different wages, So I cannot overlap the period of half an hour to next. The above solution only address for time frame 12:00 am. How can I get the solution to my problem.