Jump to content


Photo

UNIX time


  • Please log in to reply
1 reply to this topic

#1 reazik

reazik
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 21 April 2006 - 08:24 PM

Help!

I'm still working on creating a job bulletin for my company and I'm a newbie, so it's not easy.

I want each job to reflect the last date it was updated. Fortunately, there's already an SQL entry that does that for me, but it comes up as UNIX time.

Here's the code I'm using:

<table width="90%">
<tr valign="top" {ALTERNANCE}>
<td width="30" class="style1"><a href="details.php?id={JOB_ID}" class="style2">{JOB_NAME_TITLE}</a></td>
<td width="60" align="center" class="style1">{JOB_DATE}</td>
<td width="200" class="style1">{JOB_LOCATION_TITLE}</td>
<td width="210" colspan="2" class="style1">{JOB_SUMMARY}</td>
</tr>
</table>

(look at [a href=\"http://psninc.net/forms/JobBulletin2/list.php\" target=\"_blank\"]http://psninc.net/forms/JobBulletin2/list.php[/a] for results)

How do I "translate" the {JOB_DATE} into a 0-00-0000 format?

P.S. When I tried to change the number in myPHPAdmin from an integer to a date, it got rid of all of the data, so I don't want to do that again.

Is my question clear enough? Or do I need to provide more information.

Waiting with baited breath....

Thank you in advance for any guidance you can give me...

#2 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 21 April 2006 - 11:38 PM

Try this..

<?PHP

$my_timestamp = time();

echo date("m d, Y", $my_timestamp);
?>

then read here [a href=\"http://us3.php.net/date\" target=\"_blank\"]http://us3.php.net/date[/a]

Lite...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users