Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 11:07 AM
Senior Member
 
Join Date: May 2007
Posts: 345
Default display the crtime

I have a script that organized data entries by the date submitted through the crtime function. How do I display the crtime. What would be the php code to display the date that the item was created ?
Reply With Quote
  #2 (permalink)  
Old 06-28-2007, 11:12 AM
Senior Member
 
Join Date: Mar 2007
Posts: 193
Default

Quote:
Originally Posted by mouse View Post
I have a script that organized data entries by the date submitted through the crtime function. How do I display the crtime. What would be the php code to display the date that the item was created ?

crtime is not a built in php function.
Reply With Quote
  #3 (permalink)  
Old 06-28-2007, 11:14 AM
Senior Member
 
Join Date: Mar 2007
Posts: 274
Default

try just echo / vardump crtime and show what the value is.
Reply With Quote
  #4 (permalink)  
Old 06-28-2007, 11:18 AM
Senior Member
 
Join Date: May 2007
Posts: 217
Default

that sounds like it could be a custom function with the script and not a regular PHP function. you should dig through the code and find other examples of how they used crtime.
Reply With Quote
  #5 (permalink)  
Old 06-28-2007, 11:20 AM
Senior Member
 
Join Date: May 2007
Posts: 345
Default

I noticed that it uses the .time(). to store the date added and when stored in the database it looks like this: 1164408499
how would i make that a date like: 11/11/2006 ? or whatever date that may be.
Reply With Quote
  #6 (permalink)  
Old 06-28-2007, 11:22 AM
Senior Member
 
Join Date: May 2007
Posts: 284
Lightbulb

if u use a timestamp is stored in $row['crtime'], then it would be:


Code:
$dateadded = date("m/d/Y",$row['crtime']);
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:47 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0