Expected Date/Time Format During Table Import

Discussion in 'Microsoft Access Form Coding' started by Don, Sep 28, 2005.

  1. Don

    Don Guest

    I am trying to create a table by importing CSV data from a text file. There
    is a time stamp field in the CSV file. A typical value looks like:

    9/28/2005 9:00:36 AM

    When importing the CSV file, the import filed is changed from 'Text' to
    'Date/Time'. But when the import is processed, MS Access reports 'type
    conversion errors'. The time stamp field in the CSV file is generated by
    printing the value of a Date/Time variable in a VB application. It would
    seem the two should be compatible.

    Any ideas on how to address this problem will be greatly appreciated!

    Thanks!

    Don
     
    Don, Sep 28, 2005
    #1
    1. Advertisements

  2. Don

    Don Guest

    Problem solved!

    Through experimentation, concluded that the imported date/time must be in
    24-hour format:

    9/28/2005 9:00:36 not 9/28/2005 9:00:36 AM
    9/28/2005 21:00:36 not 9/28/2005 9:00:36 PM

    Hope this saves someone a similar adventure!

    Don






    "Don" <> wrote in message
    news:%...
    >I am trying to create a table by importing CSV data from a text file.
    >There is a time stamp field in the CSV file. A typical value looks like:
    >
    > 9/28/2005 9:00:36 AM
    >
    > When importing the CSV file, the import filed is changed from 'Text' to
    > 'Date/Time'. But when the import is processed, MS Access reports 'type
    > conversion errors'. The time stamp field in the CSV file is generated by
    > printing the value of a Date/Time variable in a VB application. It would
    > seem the two should be compatible.
    >
    > Any ideas on how to address this problem will be greatly appreciated!
    >
    > Thanks!
    >
    > Don
    >
     
    Don, Sep 28, 2005
    #2
    1. Advertisements

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. Kimberly

    Run-Time Error 3061...Too few parameters. Expected 2

    Kimberly, May 6, 2004, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    528
    Dirk Goldgar
    May 6, 2004
  2. Kim

    Run-Time Error 3061 - Expected 1

    Kim, May 6, 2004, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    158
    Dan Artuso
    May 6, 2004
  3. Martin Dashper

    Table Date/Time format in code

    Martin Dashper, Feb 22, 2006, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    176
    Martin Dashper
    Feb 22, 2006
  4. Mike Saifie
    Replies:
    1
    Views:
    1,094
    Jeff Boyce
    Mar 9, 2006
  5. savigliano

    converting general date format data into short date format

    savigliano, Nov 27, 2006, in forum: Microsoft Access Form Coding
    Replies:
    3
    Views:
    834
    John Vinson
    Nov 27, 2006
Loading...

Share This Page