Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Plotting Times of Day.

Plotting Times of Day

Written by Allen Wyatt (last updated January 4, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


Richard has some source data that shows the date and time displayed in the format dd/mm/yy hh:mm, but when he creates a chart from that data, the only thing that is plotted is the date. He is wondering if there is a way of plotting the times on the chart, as well as the date.

There are several ways you can approach this issue, depending on the type of chart you want to create. If you create an X-Y scatter chart, the date and time should plot automatically. This is not the case if you choose to create a bar, column line, or any other type of chart. In those cases, the X axis is created from equally spaced values, so you won't get exactly what you want.

If you don't want to use a scatter chart, then you could simply modify the data in your source. Add a column that represents the hour of the day, derived through the HOUR function. For instance, if you have your date and time in column B, add a column C and fill it with formulas such as =HOUR(B3). The result is a bunch of numbers representing the hour of the day, 0 through 23. This can chart very easily in any manner desired.

If that doesn't fit your needs, then go ahead and create the chart as you normally would. Then, if you are using Excel 2007 or Excel 2010 right-click the X axis and choose Format Axis from the Context menu. You should see the Format Axis dialog box and choose Number at the left of the dialog box. (See Figure 1.)

Figure 1. The number options of the Format Axis dialog box.

You can display the equivalent controls in Excel 2013 or a later version by right-clicking the axis and choosing Format Axis from the Context menu. Excel displays the Format Axis pane at the right side of the screen. The pane should already be set to Axis Options | Axis Options (sounds redundant; I know). All you need to do is expand the Number group at the bottom of the pane. (See Figure 2.)

Figure 2. The Format Axis pane.

Choose one of the formats for the axis under either the Date or Time categories. You may have to play a bit with your selection, experimenting to find out what works best. Quite honestly, what works best in one situation won't necessarily work best in another because of the nature of the data being charted.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9547) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Plotting Times of Day.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Form Fields in Headers and Footers

When working with form fields, you may want to place those fields in the header or footer of a document. Word won't let ...

Discover More

Word Won't Start Right

Sometimes it seems that no matter what you do, you can't display Word on your screen. If this is the case, it could be ...

Discover More

Printing Limited Pages from a Range of Worksheets

Need to print just a few pages from a group of worksheets? The easiest way to handle the task may be through a macro, as ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Removing a Trendline Error Message

Excel allows you to add trendlines to your charted data. It is possible, though, that lately you've been seeing a ...

Discover More

Excluding Some Data from a Chart

Excel is a whiz at creating charts from your worksheet data. When the program tries to determine what should be included ...

Discover More

Changing Axis Tick Marks

Create a chart in Excel, and you may find that the tick marks shown on the axes in the chart aren't to your liking. It is ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.