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

Adjusting Row Height for Your Text

Want Excel to automatically adjust the height of a worksheet row when it wraps text within the cell? It's easy to do, ...

Discover More

Limiting Lines in a Table Cell

When creating tables, Word automatically sets the size of the cells. But what if you want to make sure each cell is a ...

Discover More

Proper Comparisons for Dates in Merge Fields

How Word merges a data source with a document is controlled by merge fields. In those fields you may want to compare ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Specifying the Size of Chart Objects

Unhappy with the default size that Excel uses for embedded chart objects? You can't change the size at which they are ...

Discover More

Controlling Chart Gridlines

Gridlines are often added to charts to help improve the readability of the chart itself. Here's how you can control ...

Discover More

Formatting Axis Patterns

Create a chart in Excel and you can then modify it almost any way you desire. One modification is to adjust the color or ...

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 one less than 9?

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.