Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
PHP
get current time
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sejal17
New Member
Join Date:
Dec 2007
Posts:
56
#1
get current time
Apr 10 '08, 09:29 AM
hi,
I want to insert the current time in my database.how can i get the current time?
thanks in advance.
harshmaul
Recognized Expert
Contributor
Join Date:
Jul 2007
Posts:
490
#2
Apr 10 '08, 11:36 AM
if the database is Mysql u can use
Code:
NOW
which is a mysql reserved word
and heres a link with more info...
fw_error_www
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_now
If your not using MySql... WHY NOT, nah just kidding...
if no MySQL then...
PHP: date - Manual
http://uk3.php.net/date
Format a Unix timestamp
hope that helped.
Comment
Post
Cancel
Amzul
New Member
Join Date:
Oct 2007
Posts:
130
#3
Apr 10 '08, 07:24 PM
Originally posted by
harshmaul
if the database is Mysql u can use
Code:
NOW
NOW()
with '()' for function
Comment
Post
Cancel
harshmaul
Recognized Expert
Contributor
Join Date:
Jul 2007
Posts:
490
#4
Apr 11 '08, 01:14 PM
oops. (*tying a noose for an internet suicide)
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment