Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This start date value is "01-02-2022". How to convert into 01 Feb 2022 ?

What I have tried:

$ListTechnical = array();
$mySQL = 'SELECT start_date FROM assessment';
$result = mysql_query($mySQL); 
if ($result){
	if (mysql_num_rows($result) > 0){ 
		while ($row = mysql_fetch_assoc($result)){
			$ListTechnical[$row['department']][$row['id']]['start_date'] = DtMySQLJQ($row['start_date']);
			}
}
Posted
Updated 8-Jun-22 19:36pm
v2

1 solution

When needed you can convert like below:
PHP
<?php
$date=date_create("2021-03-15");
echo date_format($date,"j F Y");
?>

Results into: 15 March 2021
Refer:
PHP: date - Manual[^]
PHP date_format() Function[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900