+ Start a Discussion
StaciStaci 

set date/time field to today's date in class

I need to have a date/time field populated with the date/time of now when the class is called.  How do I accomplish this?

Best Answer chosen by Admin (Salesforce Developers) 
Dhaval PanchalDhaval Panchal
Set datetime field wity System.now();

All Answers

Dhaval PanchalDhaval Panchal
Set datetime field wity System.now();
This was selected as the best answer
levaleva

DateTime.now() ?