Timestamp import

This is the international (english) support forum for the SQLite Administrator developed and maintained by Orbmu2k.

Moderators: gto, EgonHugeist, Orbmu2k

Locked
bseller
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 29.06.2007, 09:47

Timestamp import

Post 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
You do not have the required permissions to view the files attached to this post.
pol
Senior Boarder
Senior Boarder
Posts: 91
Joined: 13.10.2005, 08:19

Post 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
bseller
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 29.06.2007, 09:47

Post 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
Orbmu2k
SQLite Admin Developer
SQLite Admin Developer
Posts: 38
Joined: 07.12.2005, 07:51
Contact:

Post 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"
bseller
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 29.06.2007, 09:47

Post 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:
Locked