Jump to content

Recommended Posts

The mysql DATE_FORMAT() function that I posted a link for and mentioned using in a query is not the same as the php date_format() function.

 

You would need to post your code to get specific help with what you are doing wrong in it.

well i use dates in several places... but one example would be...

 

$search = "SELECT * FROM messages WHERE ID_convo = '".$convo."'";

$result = mysql_query($search) or die ("SQL Error: ". mysql_error());

$num_msgs = mysql_num_rows($result);

while ($posts = mysql_fetch_array($result))

{

 

then within that loop i have... echo $posts['time']

 

and it comes out in the format of "2009-08-12 08:44:34", i want to know how to change that format and also if the user is logged in and has a timezone set, adjust for that

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.