![]() |
| ||
| PHP Date always returns 0 I am trying to insert a date into a mysql table field using <?php but when I open up mysql and run SELECT * FROM table; it returns a date value of 0000-00-00 instead of the current date at time of insert. Am I misunderstanding something with the php date function? |
| ||
| Re: PHP Date always returns 0 It was quotes around the date format string. Why does the obvious always become obvious only after you ask for help? |
| ||
| Re: PHP Date always returns 0 i think you have to use date_default_timezone_set('yourtime zone');for me it is as follows date_default_timezone_set('Asia/Calcutta');then call date(); |
| All times are GMT -4. The time now is 3:34 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC