|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
quick idea on how to change to Date format for 1500+ records
Hi,
like I said in my previous post I've inherited a horrendously designed database. 3 of the tables have dates stored as VarChar format like so: 05 January 2005 I want to convert these to Date format. All 1692 of them!! he he he Anyone know of a quick way or shall I code a function to do it Php? |
|
#2
|
|||
|
|||
|
I'm working on the same thing, but for 20,000+ records.
Easiest way: strtotime() function of php. Example: <?php $input = "26 January 2004"; $time = strtotime($input); $output = date("Y-m-d", $time); echo $output; ?> The output will be "2004-01-26" which is mysql compliant. Good luck ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > quick idea on how to change to Date format for 1500+ records |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|