Hi guys...
Check this db query..
When i run this query, its inseted as 0000-00-00 00:00:00..
Can anybody help me??
fight_date type is datetime.
insert into wp_fights(`fight_date`) values ( '11-11-2010 10:35:26')
SQL INSERT DATE
Moderator: General Moderators
Re: SQL INSERT DATE
assuming it's MySQL you need to provide date in ISO 2014 format: YYYY-MM-DD
-
rahulzatakia
- Forum Commoner
- Posts: 59
- Joined: Fri Feb 05, 2010 12:01 am
- Location: Ahmedabad
Re: SQL INSERT DATE
Hi, please use the following format in insert query:
insert into wp_fights(`fight_date`) values ('2010-11-11 10:35:26')
insert into wp_fights(`fight_date`) values ('2010-11-11 10:35:26')
-
ronipthomas
- Forum Newbie
- Posts: 3
- Joined: Thu Nov 11, 2010 4:37 am
Re: SQL INSERT DATE
Thanks Weirdan and rahulzatakia....