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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.