If I could, I would try to use a date CCK field, and have all this taken care of for me. Just wanted to make sure that wasn&#39;t an option for you. That way you maintain no code and write nothing for the database. <br><br>
-Randy<br><br><div class="gmail_quote">On Thu, Feb 3, 2011 at 11:03 PM, mahesh gajabar <span dir="ltr">&lt;<a href="mailto:mahesh143an@gmail.com">mahesh143an@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>I have a form element called date in my module file like this ..<br> $format=&#39;Y-m-d&#39;;<br>   $form[&#39;date&#39;] = array(<br>    &#39;#type&#39;  =&gt; &#39;date_popup&#39;,<br>    &#39;#title&#39; =&gt; t(&#39; Date&#39;),<br>

    &#39;#date_format&#39; =&gt; $format,<br>);<br><br>date pop up Is coming fine and I can select date easily. Issue ahead me is to submit this date to database and show it in my edit form with default value which I submitted in databse. How I can submit this date to database (which is the better  data type in table for this field?  Is it int or date or datetime in mysql?) and retvieve it in Year-Month-date format to show on screen. I am new baby to drupal .Please help me guys.<br>

<br>Mahi,<br><br>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1  970.462.7450<br><br>