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

Handling Long Lines in Address Labels

When you print address labels, you only have a limited amount of horizontal space for each line of the label. If your ...

Discover More

Creating Sparklines

Want a cool, small chart to show what your data is doing? You need a sparkline, discussed in this tip.

Discover More

Summing When the First Character Matches a Value

Summing data is a common need in Excel. Summing lots of data based on a condition that needs to be met can be a bit more ...

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)

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

Preparing a Chart Sheet for Printing

One type of chart that Excel allows you to create is one that occupies an entire worksheet. When it comes time to print ...

Discover More

Creating a Year-to-Date Comparison Chart

Excel is an excellent tool for keeping track of data over time. If you have information you are keeping by year, you may ...

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 seven minus 2?

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.