+ Reply to Thread
Results 1 to 8 of 8

Date to number (importing .epw meteorological data)

  1. #1
    Registered User
    Join Date
    11-14-2018
    Location
    Prague
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Date to number (importing .epw meteorological data)

    Hi everyone,

    I have imported yearly meteorological data (.epw format) to excel. The data has one imput per hour for 365 days, making a total of 8760 rows.
    The data I am interested in are the temperatures, which are in °C with one decimal point seperated by a dot.
    Some of the data transferred ok and are seen as 1.2 for example, but roughly half of the data were changed to dates and are seen as 01.II (01.02.2018).
    I would like to set all the data to numbers, but when I do the date formats change to XXXXX values.
    Is there a way to force the date values to change from 01.02.2018 to 1.2 for example?

    version 2013 professional.

    Thank you in advance
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    11-07-2018
    Location
    Budapest, Hungary
    MS-Off Ver
    365
    Posts
    5

    Re: Date to number (importing .epw meteorological data)

    hi, have you tried with format painter by selecting one of those which are correct and then paint the format for all of the incorrect ones ?

  3. #3
    Registered User
    Join Date
    11-14-2018
    Location
    Prague
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Date to number (importing .epw meteorological data)

    Thank you for your answer. Sadly, the solution still changes the wrong cells to a date in number format (XXXXX)

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Date to number (importing .epw meteorological data)

    Rather than to try to fix this after the paste/import, I would look more carefully at the raw data before paste/import and try to understand why Excel is converting some to dates. I would not expect Excel to convert a simple decimal number to a date, so I expect there is something more in those data that are being converted to dates.

    As a test, I searched for epw weather files and found energyplus.net that has a repository of weather data that can be downloaded in epw format (when opened in a text editor, it looks like a comma delimited text file). I copied and pasted into Excel, worked through the text to columns command, and did not see any of the temperatures converted to dates. Can you share a sample epw/text data file where Excel is converting to date, so we can explore why Excel might choose to convert some values to dates?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    11-14-2018
    Location
    Prague
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Date to number (importing .epw meteorological data)

    Thank you MrShorty,

    your step seems logical. the data is below. I had to cut the site to pieces, the forum would not allow me post a link or file :/.
    You cna download it from the address, under PM_PRAHA_PRAGUE followed by CZE_PM_Praha-Kbely.115670_TMYx.2003-2017.zip
    The data is delimited with a comma, decimals with a decimal point. It does not convert any temperatures to dates, if they are below 1°C and exactly .0°C (logically, they do not make any date). The rest is all dates.
    I tried ticking text instead of general in the folder options (page 3 during import). Did not help.

    Thank you again

    David

    climate.onebuilding
    .org/WMO_Region_6_Europe/
    CZE_Czechia/index.html
    Last edited by DavidStanek; 11-15-2018 at 11:49 AM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Date to number (importing .epw meteorological data)

    If you import the file rather than open it, you can control the interpretation of fields.

    What's your default date format?
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Date to number (importing .epw meteorological data)

    I opened the .epw file in that zip folder and did not see any of the entries in column G (except G8) converted to dates. I suspect, like shg, something local to your computer/Excel installation (like a default date format setting) that is causing it to behave differently from mine. I also do not understand why clicking on "text" does not prevent Excel from recognizing those dates, because it should force the entire column (including the date in G8) to be imported as the exact text in the source file. I have no explanation for the behavior you describe and I cannot replicate the behavior you describe, so I have not solution to offer.

  8. #8
    Registered User
    Join Date
    11-14-2018
    Location
    Prague
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Date to number (importing .epw meteorological data)

    Thank you all,
    I found the problem. The main reason was, that during the import on page three under advanced, the decimal sign was automatically a comma. At the same time a comma was used to deliminate the data, so it was presumably causing an error. Afte changing to a dot for decimal, it worked. (I have also changed my date settings from DD.MM.YYYY to D.M.YYYY, which might have helped as well).

    Keep up the good work of your forum
    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Importing data from multiple files into one regardless of number of rows
    By phpolicylady in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2016, 11:37 AM
  2. Importing data - problem with changing date format!
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2013, 11:44 AM
  3. Date Format Issue: Importing data into Excel 2007
    By harribry in forum Excel General
    Replies: 1
    Last Post: 08-18-2011, 11:17 AM
  4. Importing data based on date
    By sentinela in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2009, 01:08 PM
  5. Importing time/date data into timesheets
    By edwinkbell in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-15-2009, 05:07 AM
  6. Replies: 1
    Last Post: 01-10-2006, 05:20 PM
  7. [SOLVED] Strange problem: Computer's date changes when importing data
    By Franco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2005, 08:06 PM

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