+ Reply to Thread
Results 1 to 2 of 2

Importing Date Fields from Text Files

  1. #1
    Registered User
    Join Date
    09-29-2008
    Location
    Australia
    MS-Off Ver
    Excel 2007 Under Vista
    Posts
    10

    Importing Date Fields from Text Files

    Hi

    I have an issue reading in dates from a text file. The text files are output from a GIS program and if the record IS a date then it is out put in YYYYMMDD format e.g. 20070828. This is fine and my code (which I will attach later) handles this circumstance fine. However things go awry when MapInfo outputs a date that is actually a string e.g "27/08/2008". My code tries to interpret this as a date but ends up reverting to MDY and it is uncertain the result I will get in Excel.

    Basically I need a way to parse the text file first to check if the record is a string or a date. Any one have any suggestions?

    Below is the Code to open the text file and as you can see it is expecting a date in YMD format.

    Please Login or Register  to view this content.
    Cheers
    Clive

  2. #2
    Registered User
    Join Date
    10-04-2008
    Location
    uk
    Posts
    26
    Hi

    you could try something like this to make a copy of the file and then change all dates in dd/mm/yyyy format to yyyymmdd

    Please Login or Register  to view this content.

    qff

+ 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