Oops, I had to go back to my code to look at it.. When the import, the exported file also contains the line number in the delimited column, so I have to import as Text, then I do an update that removes the line number from the column using a SGET(importdatetimecol,17,1)) Now I am trying to take that column that where I took out the logline number and convert it to datetime
Frank Taylor – Director of Information Technology F.J. O'Hara & Sons, Inc - Araho Transfer Inc. Boston, MA - Rockland, ME - Miami, FL Direct Dial - 617-790-3093 Email: [email protected] From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef Sent: Tuesday, March 17, 2015 9:50 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Import CSV and DATETIME Tony's right. I just created a text file with one value: '03/17/15 00:00:00' I made sure my time sequence and format were both HH:MM:SS, and I was able to import that directly into a DateTime column! I also agree with Tony that there is no comma needed between date and time. The syntax of the Datetime function itself requires a comma: DateTime(DateCol, TimeCol) Karen -----Original Message----- From: Tony IJntema <[email protected]<mailto:[email protected]>> To: RBASE-L Mailing List <[email protected]<mailto:[email protected]>> Sent: Tue, Mar 17, 2015 8:39 am Subject: [RBASE-L] - RE: Import CSV and DATETIME Frank, First have a look at your settings especially the time, does it look like: hh:mm:ss There is no comma needed between date and time It should not be a problem to import this column directly as date time. Hope this helps Tony From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]?>] On Behalf Of Frank Taylor Sent: dinsdag 17 maart 2015 14:27 To: RBASE-L Mailing List Subject: [RBASE-L] - Import CSV and DATETIME I have a export file that I am importing that contains a column of DateTime that imports as Text, I then alter the table to add a DATETIME column so I can order the data. However I cannot seem to directly convert the Text Column in to the DateTime Column with an Update {Table} set (RBaseDateTimeColumn) = (Datetime(TextDateTimeCol)) In the table the Text Date time looks like 03/17/15 00:00:00 I am assuming because the Datetime function is looking for a comma between the Date and Time it fails. My work around is to do a CURSOR through the data and set a variable defined as Datetime to the Text DateTime and then insert that variable into the DateTime Column, but that take a really long time for all these records. Is there a better way that I am not thinking of ? • Frank Frank Taylor – Director of Information Technology F.J. O'Hara & Sons, Inc - Araho Transfer Inc. Boston, MA - Rockland, ME - Miami, FL Direct Dial - 617-790-3093 Email: [email protected]<mailto:[email protected]>

