Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
1:38 am Apr 28, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
Please Explain with example How do I insert the date into the table
ifuturz
Msg#:4458564
10:00 am on May 28, 2012
(gmt 0)
Please Explain with example How do I insert the date into the table in PHP ?
g1smd
Msg#:4458578
10:54 am on May 28, 2012
(gmt 0)
Let's see your code and someone can guide you where you're going wrong.
topr8
Msg#:4458605
12:41 pm on May 28, 2012
(gmt 0)
have you considered just using a timestamp field in the database, and let it automatically enter the date
rocknbil
Msg#:4459075
4:39 pm on May 29, 2012
(gmt 0)
Or a date type, or a datetime type.
For those, literal values must be quoted and in YYYY-MM-DD format. Date functions do not:
insert into tablename (my_date_only_field) values (curdate()); // date only
insert into tablename (my_date_and_time_field) values (now()); // date and time
insert into tablename (my_date_only_field) values ('2012-02-01'); // date only
insert into tablename (my_date_and_time_field) values ('2012-02-01 02:59:22'); // date and time
mySQL Date and Time
[dev.mysql.com]
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Mar
,
Feb
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
Hello again, it's been a while
AdSense Earnings and Observations - April 2026
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
I need some SEO help
iPhone Safari 26.4.1 errors: IPv4 & Host
2025 Link Building Trends and Insights
Does SEO matter any more?
SEO question
Home
Forums Index
Server Side
/
PHP Server Side Scripting
1:38 am Apr 28, 2026