You need to explicitly set the columntype to avoid the default datatype.<br>$field5->columntype = 'DATE';<br><br>NOTE: If the column already exists in the table, the datatype will not be altered.<br><br>Regards,<br>
Prasad<br><br><div class="gmail_quote">On Mon, Aug 23, 2010 at 12:46 AM, Darjan Prtic <span dir="ltr"><<a href="mailto:dprtic@gmail.com">dprtic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hello all!</div><div><br></div><div>I have created date field for my custom module like this</div><div>=====</div><div>$field5 = new Vtiger_Field();</div><div>$field5->name = 'startdate';</div><div>$field5->label = 'Start Date';</div>
<div>$field5->uitype = 5;</div><div>$field5->typeofdata = 'D~O';</div><div>$field5->displaytype = 1;</div><div>$block2->addField($field5);</div><div>=====</div><div>why is this field in vtiger_my_custom_module not created as date column but as Varchar? Am i doing something wrong or it is a bug in vtlib?</div>
<div><br></div><div>Thanks for your replies!</div>Darjan Prtic<font color="#888888"><br>
</font><br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br>