logo
search
Chart & Visualization Issues

How to Use Date and Time Timestamps on an Excel Chart Axis

Chanuka GeekiyanageChanuka Geekiyanage Oct 9, 2026 870 views

Question details

The user needs to display complete date and time values accurately on the horizontal axis of a chart, preventing data points on the same day from clustering together.

How to Use Date and Time Timestamps on an Excel Chart Axis
Product
Excel
Device & OS
not provided
Scenario
Creating a chart from a dataset that includes detailed date and time timestamps to visualize chronological measurements.
Observed behavior
When using a standard Line chart, Excel groups measurements taken on the same date at a single horizontal position, ignoring the time component of the timestamp.
Before you start

Verify that your timestamp data is stored as valid numeric date-time serial values rather than text strings, as spreadsheet programs require numerical data to plot axes proportionately.

Solution 1Recommended

Change the Chart Type to XY (Scatter)

Switching to an XY (Scatter) chart forces Excel to read the complete numeric date and time serial values, distributing points accurately along the X-axis based on their exact time.

A standard Line chart treats the horizontal axis as categorical data or purely date-based labels, which forces multiple measurements from the same day into a single column. An XY (Scatter) chart relies on actual numerical scaling for both axes, utilizing the hidden decimal values of timestamps (where whole numbers equal days and fractions equal time) to plot data chronologically.

1
Select the Existing Chart

Click anywhere on your current Line chart to select it and reveal the Chart Tools.

2
Open the Chart Type Menu

Right-click the chart area and select 'Change Chart Type' from the context menu, or navigate to the 'Chart Design' tab on the ribbon and click 'Change Chart Type'.

3
Select the Scatter Chart Option

In the dialog box, select 'X Y (Scatter)' from the list of chart categories on the left side.

4
Choose a Scatter Sub-type

To maintain a line-like appearance, select 'Scatter with Straight Lines' or 'Scatter with Smooth Lines' at the top, then click 'OK' to apply.

Change the Chart Type to XY (Scatter)
Format Axis to Show Time: If the new Scatter chart axis only displays dates, right-click the horizontal axis, choose 'Format Axis', go to 'Number', and apply a custom format code such as 'dd/mm/yyyy hh:mm'.
Seamless Spreadsheet Solution

Plot Precise Date and Time Data with WPS Spreadsheet

WPS Spreadsheet provides robust, professional charting tools to accurately visualize time-series data. You can effortlessly switch your charts to an XY Scatter format to map exact date and time measurements without data distortion.

  1. 1. Select Your Dataset: Open your dataset in WPS Spreadsheet and highlight the columns containing your timestamps and values.
  2. 2. Insert a Scatter Chart: Go to the 'Insert' tab on the top ribbon, click the 'Scatter' chart icon, and select a 'Scatter with Smooth Lines' or 'Straight Lines' layout.
  3. 3. Customize Axis Formatting: Double-click the horizontal axis to open the Axis properties panel. Under the 'Number' category, choose or input a custom Date and Time format to display the exact timestamps perfectly.
Fully compatible with Microsoft Excel (.xlsx) file formats and complex chart structures.Accurately reads and plots exact date and time serial values on chart axes.Intuitive chart design interface for quick modifications and custom axis formatting.Lightweight, free alternative for advanced data analysis and professional reporting.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel Line chart group different times into one date?

Excel Line charts treat the horizontal X-axis as categorical text labels by default. Even when set to a Date axis, it categorizes data strictly by day (the integer part of the date serial number), grouping any measurements taken at different hours on the same date into one vertical alignment.

How do I format the X-axis to display both the date and the time?

Right-click the horizontal axis on your chart and select 'Format Axis'. In the pane that appears, scroll down to 'Number', select 'Custom' from the Category dropdown, and type a format code like 'dd/mm/yyyy hh:mm:ss' in the Format Code box, then click 'Add'.

Can I still connect my data points with a line in a Scatter chart?

Yes. When you change your chart type to X Y (Scatter), you can select specific sub-types such as 'Scatter with Straight Lines' or 'Scatter with Smooth Lines'. This will connect your chronologically ordered data points sequentially, visually mimicking a standard Line chart but with accurate time-based spacing.

Why is my date and time data plotting incorrectly even after switching to a Scatter chart?

Your source timestamps might be formatted as text strings rather than true numerical date-time values. To check this, select your data cells and format them as 'General' or 'Number'. If they do not convert into decimal numbers (e.g., 45336.368), Excel cannot plot them. Use the 'Text to Columns' tool or the VALUE function to convert them into real numbers.