+ Reply to Thread
Results 1 to 9 of 9

csv import - column not importing as date

  1. #1
    Registered User
    Join Date
    04-01-2007
    Posts
    10

    Smile csv import - column not importing as date

    hey there

    I am just learning to manipulate data better so would appreciate some help please

    1 column imports like a date field (format is general) 08/01/1988

    this date is actually 01/08/1988

    if I change it to a date format all that happens is either the 0 gets dropped off or it stays.

    How do I reverse the dates please

    thanks

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    It looks like the month and day are switched. Use Format > Cells, then select Custom in the Number tab. Look in the Type box, and if it is formatted as m/d/yyyy, change to d/m/yyyy, or vice versa.

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    04-01-2007
    Posts
    10

    csv import - column not importing as date

    thanks Jason

    my format for the column is date dd/mm/yyyy

    when I go to format \ custom and I verify above it does not seem to save it

    eg when I go back in to have a look I am back at format = date

    very strange! any other suggestions

    cheers

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Are you saving as a CSV or XLS file after changing it? I believe the custom format needs to be saved as an XLS file to be preserved. If this is not possible for your application, I don't know of an answer. Maybe someone else can help you out.

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    try this formula in a blank column - change A1 to suit

    =DATE(MID(A1,7,4),MID(A1,4,2),LEFT(A1,2))
    autofill formula down
    copy column with the formula > Pastespecial. values in into column with dates > delete colum with formulas
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  6. #6
    Registered User
    Join Date
    04-01-2007
    Posts
    10

    csv import - column not importing as date

    ok thanks guys

    definately saved as .xls

    ok I think I am missing something

    I changed my date column to A and inserted a column B (was I supposed to insert the formula into B - relate it to column A

    therefore your formula is relating correctly

    result I get is #Value!

    thanks

  7. #7
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    can you post a copy of your book

    If neccessary blank all columns & leave date column

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Perhaps you have some extra spaces in the data.

    One easy method to try. Select column of dates

    Data > Text to Columns > Next > Next > under "column data format" select "date" and MDY > Finish

  9. #9
    Registered User
    Join Date
    04-01-2007
    Posts
    10

    Smile SOLVED -csv import

    thank you to all that replied for me

    DaddyLongLegs - excellent that did the trick - much appreciated

    saved a lot of work

+ 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