function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priyanka Reddy 74Priyanka Reddy 74 

how to make date field null or blank

Hi All,

Im unable to make date feild null can some one suggest me how we can do that.
 
string date = 'Sat Apr 04 00:00:00 GMT 2020';

string dddd= null;

 Date myDate = date.valueOf(dddd);
 system.debug('mydate ::'+myDate);
 

updateAccount.SLAExpirationDate__c  = myDate;

Thank you.
AbhishekAbhishek (Salesforce Developers) 
Sample Code:


Date Due_Date__c = null;


For further reference, you can check this too,

https://salesforce.stackexchange.com/questions/106643/visual-flow-how-to-set-date-field-to-null-blank


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Priyanka Reddy 74Priyanka Reddy 74
Hi,

Im trying to convert string to date , if string is either empty or null, date feild should be null.