From termcc at googlemail.com  Mon Mar  3 21:10:53 2008
From: termcc at googlemail.com (Tom McCallum)
Date: Mon, 03 Mar 2008 20:10:53 -0000
Subject: [Rd] DataTime field when converting between database formats
Message-ID: <op.t7gicfmwcsmg07@localhost.localdomain>

I was recently converting a MS-Access database to MySQL when I came across  
this error:

Error in fromchar(unclass(x)) :
   character string is not in a standard unambiguous format

The error occurs because the NULL value of a DateTime field, if not  
properly setup or on export to a CSV, can be set to '0000-00-00 00:00:00'  
which fails the NA test in R-2.6.2/src/library/base/R/datetime.R on line  
32.

Can I recommend that this either raises a more specific error, or that it  
automatically converts this value to NA and perhaps outputs a warning.

For now I have fixed the incoming data, but thought I would register this  
behaviour in case anyone else came across it.

Best,

Tom



[Rd] DataTime field when converting between database formats
Tom McCallum