I have a php script where I need to update the date format from CYYMMDD to MM/DD/YYYY, I wrote a function to do this for me, however when I go to print it, the result says 'Array'.
//Modify Date Format from CYYMMDD to MM/DD/YY
function getDate(string $iDATE){
$iDay = substr($iDATE,5,2);
$iMonth = substr($iDATE,3,2);
$iYear = substr($iDATE,1,2);
$iDATE = $iMonth . "/" . $iDay . "/" . $iYear;
RETURN $iDATE;
}
Here is the line I'm trying to call the function from:
print "<td align='left' class='Col2'><font face='Calibri' size='3'>".getDate($iDATE)."</td>";
Output : Array
Any thoughts?