+ Reply to Thread
Results 1 to 8 of 8

Dates not formatted as dates

Hybrid View

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    4

    Dates not formatted as dates

    Hi,

    I am working with an excel file I imported from online with lots of data. I am trying to arrange the data by date. Unfortunately all of the data in the file (both numbers and dates) are reading as text. I tried to right click and change formatting, but that had no effect. I tried using text to columns, but also did not have success. Any suggestions or am I ordering this data by hand?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Dates not formatted as dates

    Post a sample file so that we can see the variations. Presumably your preferred format is mm/dd/yyyy ?

    Pete

  3. #3
    Registered User
    Join Date
    10-04-2012
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dates not formatted as dates

    Here is a sample.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Dates not formatted as dates

    Can you tell me what MST means and how that relates to you own time-zone. Do you want dates and times in separate columns for this?

    Pete

  5. #5
    Registered User
    Join Date
    10-04-2012
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dates not formatted as dates

    MST is Mountain Standard Time and MDT is Mountain Daylight time. These data were collected from a SNOTEL site in Glacier National Park, US. I am not sure why it changes, but probably has something to do with ease of recording. I do not mind if times are with dates, I just need them to register as such with excel. It may help me solve some of my problems, however, if they were separated. Whichever is easiest.

    Thank you for taking a look at this.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Dates not formatted as dates

    I found it more convenient to insert two new columns A and B, so the other data shifts over. Then you can put this formula in A2 to get the date in Excel format:

    Formula: copy to clipboard
    =DATE(RIGHT(LEFT(C2,SEARCH(" ",C2)-1),4),LEFT(C2,SEARCH("-",C2)-1),SUBSTITUTE(MID(C2,SEARCH("-",C2)+1,2),"-",""))


    and this formula in B2 extracts the time in Excel format:

    Formula: copy to clipboard
    =--SUBSTITUTE(SUBSTITUTE(RIGHT(C2,LEN(C2)-SEARCH(" ",C2))," MST",":00")," MDT",":00")


    After formatting how you would like them to appear, you can then copy them down to the end of your data. If you want the date/time combined, then all you need to do is:

    =A2+B2

    and format appropriately, then copy down.

    Hope this helps.

    Pete
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-04-2012
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dates not formatted as dates

    Thank you!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Dates not formatted as dates

    You're welcome - I didn't expect you to be logged in at this time.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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