time() and date()

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
alenxVR6
-


Joined: 04 Dec 2003
Posts: 51
Location: Revere, Boston MA

PostPosted: Sat Dec 18, 2004 8:52 pm    Post subject: time() and date() Reply with quote

I made a record submit form where I collect user information and etc... My date() and time() are hidden fields and i use this to get current time and date.

my date() script works but i can't figure out how to make my time() work any help would be appreciated..

Code:
here is my code:

<?php print(date("y,m,d")); ?> //date script
<?php print(time("h,m,s")); ?>//time script
Back to top View user's profile Send private message Visit poster's website AIM Address
GustavoDL
-


Joined: 08 Jul 2004
Posts: 16
Location: Malaga (Spain)

PostPosted: Sat Dec 18, 2004 10:16 pm    Post subject: function date Reply with quote

Use in this way

Code:
<?php
echo date("H:i:s",time()); // hours:minutes:seconds
echo date("Y-n-d", time()); // year-month-day
?>


always can look at php.net online manual about sitaxis of this function: http://www.php.net/manual/en/function.date.php

Code:
string date ( string format [, int timestamp])


time() funtion returns server's time seed
_________________
Think as WAN, act as LAN
Piensa en WAN, actua en LAN
Back to top View user's profile Send private message Visit poster's website
alenxVR6
-


Joined: 04 Dec 2003
Posts: 51
Location: Revere, Boston MA

PostPosted: Mon Dec 20, 2004 1:32 am    Post subject: Reply with quote

worked, thanks GustavoDL
Back to top View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group