+ Reply to Thread
Results 1 to 8 of 8

time date formatting issues

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    Lacombe, Alberta, Canada
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    time date formatting issues

    I have a program that exports files to excels, but excel doesn't recognize the time date format it uses. Example: 8/5/2013 20:29:43. I would like to reformat it into something that I can search through. Any help would be appreciated.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: time date formatting issues

    That date/time format looks fine, it's basically kind of the standard format.

    How is Excel not recognising it?

    Are you 'telling' Excel to treat that column as a date/time?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-28-2013
    Location
    Lacombe, Alberta, Canada
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Re: time date formatting issues

    I believe so. I currently have the cells formatted to mm/dd/yyyy hh:mm:ss, and every time I attempt to do a calculation based on the cell I get #VALUE

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: time date formatting issues

    I was actually thinking more of when you are importing the data.

    How are you importing?

    PS You can check if Excel is recognising the 'date' using ISNUMBER, if that returns TRUE it is a date, FALSE it isn't

    PPS Might be worth checking for trailing/leading/errant spaces etc

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: time date formatting issues

    Maybe the imported data has spaces before and after the data and it is possible that the space between the date and time is not really a space but another character that looks like a space.

    Select the space in the date/time string and copy it. Paste that into say M1. In N1 enter =CODE(M1) If the code isn't 32 then the space isn't a space.

    If the date and time are entered in column A enter this in column B and copy down the length of your data.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If the code in N1 isn't 160, use that number in the CHAR() function. Format the date and time the way that you want (dd/mm/yyyy hh:mm:ss)

    The above will trim off any leading or trailing spaces and "fix" any strange spaces if you found a strange code for the space. A normal space between the date and time will be left alone.
    Last edited by newdoverman; 08-06-2013 at 03:41 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    01-28-2013
    Location
    Lacombe, Alberta, Canada
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Re: time date formatting issues

    Thanks fro the advice folks, but neither of those solutions have worked. I have attached the offending original spreadsheet. Column E is the one that is giving me problemsaugust 1 - 6.xlsaugust 1 - 6.xls

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: time date formatting issues

    I multiplied the date by 1 then copied the result back into the date column formatted as dd/mm/yyyy hh:mm:ss.

    Workbook with calculation enclosed.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-28-2013
    Location
    Lacombe, Alberta, Canada
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Re: time date formatting issues

    I tried exporting the file fro the program again, this time without using it to pre-analyze the data. The raw data works flawlessly. Thanks for you time folks.

+ 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. [SOLVED] Date Formatting Issues
    By GalmOne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2012, 08:44 AM
  2. Date and Time Issues
    By ScottL in forum Excel General
    Replies: 1
    Last Post: 11-29-2011, 02:07 PM
  3. Date and Time issues
    By Kypsis in forum Excel General
    Replies: 2
    Last Post: 12-02-2010, 04:16 PM
  4. Date formatting issues
    By kguillen in forum Excel General
    Replies: 0
    Last Post: 04-04-2009, 12:38 PM
  5. Date formatting/conversion issues
    By Abacus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2009, 07:09 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