Skip to main content

Making graphs from database with Time/Date field [Resolved]

I've been trying to make a diagram from a LibreOffice (version Base database with a date/time field, by copying the table in Calc. But the graph completely ignores the time part.

To explain what I mean, I've made a simple example database with one table. Here's the table definition:

Table definition

And here's the table content, as defined in Base:

Table content

I've then copy/pasted the table into a new Calc document, and generated a graph from the data. The result looks like this:

Resulting diagram

As you can see, in the copied data, both date and time are still there, but in the diagram, the time is set to 0:00 for all data points, making the diagram wrong.

So what do I have to do to get a correct diagram from my database?

Question Credit: celtschk
Question Reference
Asked July 18, 2019
Posted Under: Unix Linux
1 Answers

First, check the chart type - is hat to be XY (Scatter). Second, check the content type of the Zeit column. Is it plain text, or are the values recognized as date/time values by LO? To check this, select one of those cells, right-click and select Format Cells... - on the Numbers tab, LO should have selected a date/time format. Now, it should work:

enter image description here

See also this Q/A on creating charts in LO Calc with date (/time) values.

credit: Community
Answered July 18, 2019
Your Answer