By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 803 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

Bad date error

P: 27
HI
Can Anyone help me in correcting the error.I have a datbase in psql which has a date field.While trying to insert it using php form i am getting the error:
Warning: pg_query(): Query failed: ERROR: Bad date external representation '' . in
/var/www/html/date.php
But When i try to insert directly from Database it is working.
What may be the problem??Anyone please help.

Thank u in advance.
Sep 8 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 700
Are you sure the date format you use in postgres and in the script are the same?
Sep 8 '08 #2

P: 27
hi some how i managed to correct the date format.Now i have a problem with the phone number field.I have specified while creating the table as phone integer.But when i try to insert a value which has more than 10 digits,it shows error.No validation has done yet.
How can i correct it.
Sep 9 '08 #3

Expert 100+
P: 700
hi some how i managed to correct the date format.Now i have a problem with the phone number field.I have specified while creating the table as phone integer.But when i try to insert a value which has more than 10 digits,it shows error.No validation has done yet.
How can i correct it.
change the column type to varchar(max_number_of_characters) or char(max_number_of_characters)
Sep 9 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.