Re: Importing a timestamp

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 09/01/04


Date: Wed, 1 Sep 2004 07:35:34 -0400

Access won't work with the decimal second part: it's only designed to hold
yyyy-mm-dd hh:nn:ss.

Try importing it as text, then write an Update query to remove everything
after the decimal point. Once you've done that, you can add a Date/Time
field to the table and write another Update query to populate the Date/Time
field with the value of the Text date field (using the CDate function)

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Brenda" <Brenda@discussions.microsoft.com> wrote in message
news:7E618A04-393D-4AF8-B6DC-2B37D8B2A208@microsoft.com...
> I was importing a text file with a timestamp into a new table using the
> import wizard. I have set the advanced to be the correct date format. But
I
> can not get the timestamp to import. The timestamp has the following
format.
>
> yyyy-mm-dd hh:nn:ss.sssssssss
>
> I do not know how to set the format for a field during the import. Guess I
> could import to an existing table, but I do not know the format pattern
for
> the above timestamp in the designer.
>
> Another question. During the import wizard, how can you set the length of
> the text fields during import.
>
> Thanks
>


Relevant Pages

  • TXT file Import - Date / text field conversion
    ... I have a csv that I am importing into an Access 2000 DB. ... I tried an update query whereby I created a new date field called First ... I also used the custom format of "ddmmmyyyy" in the table design format ...
    (microsoft.public.access.externaldata)
  • Re: Format Date
    ... After importing as a text field, you can use an Update query to populate the real date field with an expression like this: ... Should I try to change the way I write it to the text file in the format 07/15/2008 and then see if the import spec will work with date? ...
    (microsoft.public.access.modulesdaovba)
  • Importing a timestamp
    ... I was importing a text file with a timestamp into a new table using the ... I have set the advanced to be the correct date format. ... During the import wizard, how can you set the length of ...
    (microsoft.public.access.gettingstarted)
  • Re: update query and phone/fax format
    ... >I didn't set a default mask for format before importing. ... >the way I want using an update query? ...
    (microsoft.public.access.queries)
  • Re: [RFC] BPF timestamping
    ... expand it to be able to use different format and resolution. ... This has too many timestamp types, ... involves clock ids of type clockid_t with names like CLOCK_REALTIME ...
    (freebsd-net)