1
ccrstudioweb
integer to date format

Hi,
I could´t find answer.
I made a script that call some "news module" data.
The problem is about date:
I have something like "1234567890" instead of "19 de fevereiro de 2009".

How can I convert integer to my date format?
I´v found about intvar, strval, but I cound´t discovery how to use it....

le="color: #000000"><?php $result = mysql_query("SELECT * FROM 3b5s_stories ORDER BY -storyid"); if($row = mysql_fetch_array($result)){ $dada = $row["created"]; echo $dada; // returns "1234567890" instead of "19 de fevereiro de 2009" ... }


Any help is very welcome!

2
Mazar
Re: integer to date format
  • 2010/2/19 22:54

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


le="color: #000000"><?php .formatTimeStamp($dada,"s");

or do something like this
le="color: #000000"><?php date("Y-m-d", strtotime($row['date']));

3
ccrstudioweb
Re: integer to date format

Thank you Mazar!
I used this:
le="color: #000000"><?php date("Y-m-d", strval($row["created"]))

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits