0

I couldn't find anywhere to ask this question and i'm working with PHP so i thought i would ask it here.

What would be the SQL statement to modify a database field from 'YYYY-MM-MM' to 'DD-MM-YYYY'.

Thanks,

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Cerberus
0

You can use PHP function to convert 'YYYY-MM-DD' to 'DD-MM-YYYY' :

function convertDate($date) {
 	
          $new = explode("-",$date);
          $a=array ($new[2], $new[1], $new[0]);
 
          return $n_date=implode("-", $a);
 }

- Mitko Kostov

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.