PHP CODE for date.........
<?php
$datein = '1998-09-21';
if(preg_match('/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/', $datein,$parts)){
print_r( $parts);
print_r($parts[2]."/" .$parts[1]."/" .$parts[0]);
}
?>
where i am mistaken in this code, as i am getting month and day well but for years, it show me full date........ please correct me or advice me to do in right manner.