Page 1 of 1

Timestamp import

Posted: 29.06.2007, 20:08
by bseller
Hi,

Had some problem with inputting timestamp fields in SQLite Admin.
So I inputted the timestamp data via the program the database runs under. The program uses the SQLite API.

Then I exported the database table to a csv file and imported the file again via SQLite Admin.
All timestamp fields where reset to 12/30/1899 7:00:00 AM.
(See attachments)

I am running Windows XP Home English version with county settings of The Netherlands.
SQLite dll version 3.4.0.
Placed the dll in the Windows32 directory, removed all other from the system.

Questions:
1. What went wrong during import of the csv file?
2. What format should a timestamp have when editing in SQLite Admin?
3. Should the timestamp in the cvs file not be in general ISO 8601 format i.e. yyyy-mm-dd HH:MM:SS
4. A nice to have: Automatic selection of matching fieldnames in de csv and the table when importing data.

regards Ben

Posted: 02.07.2007, 13:30
by pol
Hi,

How did you export the data? The date format looks quite weird. And 12/30/1899 looks quite like zero.

Regards,
RĂ¼diger

Posted: 02.07.2007, 19:31
by bseller
RĂ¼diger,

As I said:

First I put real datatime stamps in the table with a program.
Exported that table in SQLite Admin to a csv file.
Imported the csv file back again with SQLite Admin with the given result.

Yes, looks to me too as a zero value.

Date object in most programming languages store date/time as a float type. The value stored in the object is the number of days after ( or before is negative) a predefined date for that language.

So I think SQLite Admin cannot convert the date/time during import and defaults to zero and than stores this 'zero' in the datetime field of the table.

Still does not answer the question of what format does SQLite admin expects. :(

Regards,

Ben

Posted: 04.07.2007, 11:03
by Orbmu2k
Hey, theres a bug, i have to export this sqlite formated :) Maybe i fix it anytime ;-)

The expected timestamp format is "yyyy-MM-dd hh:mm:ss"

Posted: 04.07.2007, 20:47
by bseller
Orbmu2k,

Thanks for the response.

I will edit the csv file I have correcting the data to that format.

Waiting for a next version :D

PS: Vergiss nicht mein 'nice to have' wunsch bitte :idea: