View previous topic :: View next topic |
Author |
Message |
alenxVR6 -
Joined: 04 Dec 2003 Posts: 51 Location: Revere, Boston MA
|
Posted: Sat Dec 18, 2004 8:52 pm Post subject: time() and date() |
|
|
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 |
|
 |
GustavoDL -
Joined: 08 Jul 2004 Posts: 16 Location: Malaga (Spain)
|
Posted: Sat Dec 18, 2004 10:16 pm Post subject: function date |
|
|
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 |
|
 |
alenxVR6 -
Joined: 04 Dec 2003 Posts: 51 Location: Revere, Boston MA
|
Posted: Mon Dec 20, 2004 1:32 am Post subject: |
|
|
worked, thanks GustavoDL |
|
Back to top |
|
 |
|