AnsweredAssumed Answered

Getting a date data type from a datetime

Question asked by Missy Brooks on Oct 5, 2018
Latest reply on Oct 9, 2018 by Missy Brooks

I am following the info here:

http://support.sugarcrm.com/Knowledge_Base/Studio_and_Module_Builder/Sugar_Logic/Calculated_Field__Converting_Datetime_t… 

 

I am using the formula as specified by casting a date time to a string, then taking a substring of that and using as a parameter to cast to a date.  I am doing this in the formula builder to populate a field of datatype date, marked as a calculated value.

 

Since this wasn't working, I created a new filed, of the text field data type, and tried entering a formula that is simply toString($date_entered) where $date_entered is the datetime field I am trying to work with.  This also fails, and neither the new date field nor the new text field are populated.  What am I doing wrong?  And can someone point me toward the documentation for all data types and functions?

Outcomes