numan82 Posted February 20, 2008 Share Posted February 20, 2008 hi to all, I am having little problem with Date Format, actully I am reading data from MS SQL Server 2000 and inserting into the MySQL. The Date format of SQL Server 2000 is like 19990120 and MySQL accept the date in the format of YY-MM-DD, I tried several function but could not get the solution, I also tried the implode function but it is not working. any help thanks in Advance... Numan Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 20, 2008 Share Posted February 20, 2008 You can insert a yyyymmdd value directly into a mysql DATE data type - 9.3.1. The DATETIME, DATE, and TIMESTAMP Types ... As a string with no delimiters in either 'YYYYMMDD' or 'YYMMDD' format, provided that the string makes sense as a date. For example, '19970523' and '970523' are interpreted as '1997-05-23', but '971332' is illegal (it has nonsensical month and day parts) and becomes '0000-00-00'. or As a number in either YYYYMMDD or YYMMDD format, provided that the number makes sense as a date. For example, 19830905 and 830905 are interpreted as '1983-09-05'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.