Re: DateTime Custom Field ?

Originally Posted by
spencer134 First of all I'm new with SugarCRM so pardon me if I ask newbie question

I did try searching for an answer but did not find one.
Is there a DateTime custom field? I can only see Date field when I try adding custom fields to Leads, Accounts, etc.
I'm looking at: Developer Tools > Studio
Thanks!
Not in studio but you can create one
I created my field as a time field but then went to vardefs & set it to be a datetime field
'date_start' =>
array (
'required' => false,
'name' => 'date_start',
'vname' => 'LBL_DATE_START',
'type' => 'datetime',
'massupdate' => 0,
'comments' => '',
'help' => '',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => 0,
'reportable' => 0,
'len' => '25',
),
I then changed the type in mysql to datetime
I also changed metadata/editviewdefs.php
array('name'=>'date_start', 'type'=>'datetimecombo','label'=>'LBL_DATETIME_STA RT',),
It's a bit fiddly but it works 
Lastly because sugar makes datetime fields a drop down of hours & a dropdown of minutes in quarter hour intervals I edited include/SugarFields/Fields/DateTimecombo/Datetimecombo.js so that I can enter time in the format HH:MM
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
Bookmarks