+ Reply to Thread
Results 1 to 3 of 3

Wrong date on x-axis in line chart

  1. #1
    Registered User
    Join Date
    12-26-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2002
    Posts
    2

    Wrong date on x-axis in line chart

    Hi,

    I have a table in excel with two columns, one with dates (2010-01-01 to 2010-12-31) that I put on the x-axis and one column with values that I put on the y-axis. The dates are fomatted as YYYY-MM-DD. (My excel is installed with swedish language so in swedish the format is actually shown as ลลลล-MM-DD.)

    Whe I create an (embedded) chart (line chart or scatter chart) the dates on the x-axis starts at 1900-01-01 and the x-axis scale in the chart corresponds to one day per line in the table. The actual values of the dates in the table seems to be completely ignored when the chart is generated. If I manually edit the scale of the x-axis the currency values disappears (they fall outside the time scope).

    Can anybody help me getting correct dates on the x-axis ?

    I use Excel 2002 SP3, running under Windows XP 2002 home edition SP3.

    BR /S๖ren
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Wrong date on x-axis in line chart

    Hi Soren,

    In general your dates are not being looked at as dates. Try some date/time functions on your date values and see what happens. I believe they are being treated as text instead of dates. You may need to format the cells or reformat them to get your X-axis to work.
    Last edited by MarvinP; 12-26-2010 at 10:36 PM. Reason: Spelling so Teylyn doesn't think I'm bad.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-26-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2002
    Posts
    2

    Re: Wrong date on x-axis in line chart

    Hi Marvin,
    Thanks for inspiration, problem is solved. When I played with the date formats changing from YYYY-MM-DD to YYMMDD I discovered that one of the dates did not respond to changing to format YYMMDD. It was the date 2010-09-31 which is a non-existing date !! Obviously it made all the dates being treated as text when generating the chart.
    BR /S๖ren

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1