Jump to content

Get date from mysql date coloum formated correct


avo

Recommended Posts

Hi all

Nice new site!! I LIKE IT !!. ;D

Can anyone please help me out here i have a date coloum in mysql db once ive entered a date in the sql what would be the best way to get this date out and reformated to a uk date DD-MM-YYYY

i was trying this but for some reson it misses the year out when i echo

[quote]<input name="txt_con_expiry" type="text" id="txt_con_expiry" value="<? $tempdate=explode("-", $txt_con_expiry);
echo $tempdate[3];
echo $tempdate[2];
echo $tempdate[1];?>
" />[/quote]
$txt_con_expiry is a variable set when it is SELECTED FROM MY DB
Any ideas please

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.