Convert string to date/time MS Access will accept at import

Discussion in 'Perl Misc' started by Thomas Andersson, Aug 5, 2010.

  1. I have my data collector script finished now and it works fine. Now my
    problem is that MS Access throws a hissyfit when I try to import my data. At
    first I thought it was the AutoNumber field that caused it but it isn't as I
    found the report saying that I get "Type Conversion Failure" on every filed
    containing time info.

    All my collected data have the time info stored in this format "Jul 28
    18:34" (Tab delimitered) and now I guess I need to convert all those on the
    fly before they are stored to something Access will accept.

    Is there any (hopefully easy) way to do this?

    Best Wishes
    Thomas
     
    Thomas Andersson, Aug 5, 2010
    #1
    1. Advertising

  2. On Thu, 05 Aug 2010 02:17:33 +0200, Thomas Andersson wrote:

    > I have my data collector script finished now and it works fine. Now my
    > problem is that MS Access throws a hissyfit when I try to import my
    > data. At first I thought it was the AutoNumber field that caused it but
    > it isn't as I found the report saying that I get "Type Conversion
    > Failure" on every filed containing time info.
    >
    > All my collected data have the time info stored in this format "Jul 28
    > 18:34" (Tab delimitered) and now I guess I need to convert all those on
    > the fly before they are stored to something Access will accept.


    Not really a Perl question, but an Access one. Fortunately, been there,
    done that.

    The only way to get Access to reliably parse datetimes, is to offer them
    as YYYY-MM-DD HH:MM:SS. I think you can leave of the seconds.

    Note that this is still assumed to be in the current timezone, you'll
    neet to STFG if this is a problem for you.

    HTH,
    M4
     
    Martijn Lievaart, Aug 6, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Berg
    Replies:
    0
    Views:
    792
    Chris Berg
    Oct 27, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,267
    Michael Borgwardt
    May 30, 2004
  3. wgan
    Replies:
    7
    Views:
    595
    Roedy Green
    Jul 8, 2004
  4. Replies:
    1
    Views:
    801
    Paul Boddie
    Mar 11, 2007
  5. Replies:
    8
    Views:
    785
    Boris
    May 1, 2007
Loading...

Share This Page