Navigation
- FAQ Home
- All categories
- About Webyog support and about this FAQ
- About the SQLyog program

- Connection issues

- Using the GUI
- Managing your MySQL Database Systems

- Database Schema Synchronization
- MySQL DATA synchronization
- SQL Scheduler and Reporting Tool
- Importing external data
- Backup/Restore
- SQLyog Job Agent (SJA)

- Working with Views, Stored Procedures and Triggers
- Character Set and Localization Issues
- MySQL bugs that affect SQLyog
- Questions on Open Source and Compiling
- Sitemap
8 users online | 8 Guests and 0 Registered
Most popular FAQs 
- I get error 1130 "Host is not allowed to ... (169220 views)
- Error no. 2003: Can't connect... (86215 views)
- SQLyog Version History (63912 views)
- Error no. 1045: "Connection denied..." (61322 views)
- Error no. 1251: "Client does not support authentication..." (58307 views)
- Error No. 2005: Unknown MySQL server host... (50162 views)
- What is HTTP-tunneling? (42269 views)
- What Is SSH and SSH-tunneling? (38047 views)
- Can I use SQLyog with the WINE Windows emulator ... (34915 views)
- Why are Stored Procedures not created when I import ... (34260 views)
Latest FAQs 
- SQLyog Version History (2012-01-26 08:20)
- SQLyog is a client for the MySQL server - ... (2011-11-04 04:48)
- I get error 1130 "Host is not allowed to ... (2011-11-01 05:21)
- Problems on Ubuntu 11.x (2011-10-29 13:02)
- Problems creating a functional DSN on 64 bit Windows. ... (2011-09-15 14:34)
Sticky FAQs
Importing external data
ID #1108
I get ZERO's when importing DATE and TIME types
It is an issue with the data type. DATE and TIME data types - and their implementations - differ quite a lot across database systems. And things do not get less complicated as there is an ODBC-layer 'in-between' the source and the target. It simply is not possible to take every detail of every implementation into account automatically.
Note that
- By default SQLyog Import External Data Tool map such types to a MySQL TIMESTAMP type. We believe that that is most often what most users want and need. But In 'non-strict' mode an invalid value for a TIMESTAMP is silently converted to a ZERO-date by the MySQL server. So this is the reason for the occurring ZERO's
- After import you may want to adjust the column definition using the 'on update CURRENT_TIMESTAMP' clause on MySQL versions that support it.
- The MySQL TIMESTAMP type does not support dates like 1919-01-01 for instance. MySQL TIMESTAMP starts at '1970-01-01 00:00:00'. You will need to use a DATETIME (or a DATE if there is not 'time of day' involved) for such data. You can set the mapping behind the 'map' button for each column.
- There are 'range' restrictions with DATE and DATETIME too - but they are rarely of practical importance! However with 'archeological data' you may need to construct your own date format using more columns of simple types - or simply use an signed integer for instance.
Also refer to the MySQL docs at:
http://mysql.com/doc/refman/5.0/en/date-and-time-types.html
(please note that the implementation of those types differ slightly with different MySQL versions!)
Tags: -
Related entries:
- Installation and upgrading
- SQLyog Version History
- What is and what is not imported by the SQLyog Import External Data Tool?
- Can I perform "incremental import" with the SQLyog Import External Data Tool?
- Error messages
Last update: 2006-08-14 21:16
Author: Peter Laursen
Revision: 1.0
{translationForm}
You can comment this FAQ