<div>Even with this I get warning.</div>
<div>Say the code is</div>
<div> </div>
<div><strong><em>strtotime($form_state['values']['birthdate'])</em></strong></div>
<div> </div>
<div>But $form_state['values']['birthdate'] is an array, but strtotime expects string.</div>
<div> </div>
<div>So I get warning "warning: strtotime() expects parameter 1 to be string, array given in C:\MyWeb6.20\wamp\www\livejobs1\sites\default\modules\resume_submit\resume_submit.module on line 564."</div>
<div> </div>
<div>How do I overcome this issue....</div>
<div> </div>
<div>Thanks</div>
<div>Austin<br><br></div>
<div class="gmail_quote">On Mon, Mar 28, 2011 at 8:57 PM, Brett Evanson <span dir="ltr"><<a href="mailto:brettev@gmail.com">brettev@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">You might want to look at the strtotime function in php. I believe it<br>would take that date and turn it into a Unix epoch number (i think<br>
that's what you're looking for)<br><br>Brett Evanson<br>
<div>
<div></div>
<div class="h5"><br><br><br><br><br>On Mon, Mar 28, 2011 at 9:15 AM, Austin Einter <<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>> wrote:<br>> Hi All<br>> I have date field, I am storing it as "int" in table.<br>
> When I checked the table in database, the value shows as 1.<br>><br>> My code is as below.<br>><br>> 'INSERT INTO {rs_table} ( uid, name, qualification, email, altemail, phone,<br>> altphone, dob, yrsofexp, prefworkloc) '<br>
> ."VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%s')",<br>> $user->uid,<br>> $form_state['values']['persname'],<br>
> $form_state['values']['hqualif'],<br>> $form_state['values']['email'],<br>> $form_state['values']['altemail'],<br>> $form_state['values']['phone'],<br>
> $form_state['values']['altphone'],<br>> $form_state['values']['birthdate'],<br>> $form_state['values']['yearsexp'],<br>> $form_state['values']['prefloc']<br>
> );<br>><br>> Whats the wrong here, is there any API I have to make use of to convert from<br>> date to int value??<br>><br>> Regards<br>> Austin<br>><br>><br>><br>> On Mon, Mar 28, 2011 at 8:36 AM, Austin Einter <<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>><br>
> wrote:<br>>><br>>> Hi All<br>>> I have a date field in my form.<br>>> How do I store/retreive the value into/from MySQL.<br>>><br>>> On google search, I saw people are suggesting to use either "int" or<br>
>> "datetime" type.<br>>> Please suggest which one needs to be used.<br>>><br>>> If I use int (I hope core uses int), while storing can I just<br>>> store "form['values']['date1']" as %d and while retreivin, what are the<br>
>> related apis to convert back to date.<br>>><br>>> Regards<br>>> Austin.<br>>><br>>><br>><br></div></div>> --<br>> [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
><br></blockquote></div><br>