Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working on making a scatter plot in Excel of some temperature data. I have

column A containing the date data as mm/dd/yy. column B containing the time data as hh:mm:ss AM/PM and the rest of the columns containing temperature data.

I am able to make a graph and get it to the axis size I want, however when I change the X-axis to a time variable, it somehow thinks the date is changing and not the time. I have about 4 hours of data, so I know this is incorrect. I am getting something like 1/0/00 12:00 AM when I really should be getting 4/3/13 1:50:59 PM. Does anyone know how to change the Excel settings to get the time I want?

share|improve this question

migrated from stackoverflow.com Apr 23 '13 at 22:30

This question came from our site for professional and enthusiast programmers.

1 Answer 1

I think it's not a settings issue. Add the two fields: "theDate" + "theTime".

Excel stores dates and times as floating point values (the integer part represents the date and the decimal part represents the time).

After that, simply format this new "DateTime" value like a time (hh:mm:ss or something like that)

share|improve this answer
    
I tried modifying the two fields and also tried removing the date field to no avail. –  user1207381 Apr 22 '13 at 22:30
    
check the value of the cell (either in VBA debug window print the value of the cell or format it with a "general" or "numeric" format... times (without a date attached), are stored as 0.dddddd values; if they have an integer part, then somehow the time is being stored as a "date-time" value. Or use something like this: =int(yourDate) + (yourTime - int(yourTime)) –  Barranka Apr 22 '13 at 22:37
    
This is the correct answer. It's just in the implementation. @user1207381 if you can post some screenshots of your data that would help. –  David Zemens Apr 23 '13 at 2:29
1  
1. Make sure that your dates and times are numerical, so adding them does not produce nonsensical values. –  Jon Peltier Apr 26 '13 at 13:03
1  
2. A line chart can only distinguish date-time values with the granularity of days (whole numbers). All points for a given day occur at the axis position of the starting time of the date (i.e., midnight). Use an XY Scatter chart. –  Jon Peltier Apr 26 '13 at 13:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.