Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Convert string to date/time MS Access will accept at import

Reply
Thread Tools

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

 
 
Thomas Andersson
Guest
Posts: n/a
 
      08-05-2010
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


 
Reply With Quote
 
 
 
 
Martijn Lievaart
Guest
Posts: n/a
 
      08-06-2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use Request to Accept query String hon123456 ASP General 2 12-11-2008 04:22 AM
to use import java.lang.* or import java.lang.Math or none at all? JPractitioner Java 13 02-24-2006 08:48 PM
XML Schema question - does "import" import elements? Vitali Gontsharuk XML 2 08-25-2005 07:33 PM
ASP Access stored procedure doesn't accept leading zero Jeff Lowry ASP General 2 01-12-2005 01:04 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM



Advertisments