0

I want to insert the record in custom field whose data type is time.

Example:

obj o = new ojb();
o.StartTime__c = 10:20:00.000zCET;

but i am getting the error.

Unexpected token '='.

I have tried with 10:20 AM, 10:20 ,10:20:00.000Z but no progress.

Please provide any suggestion either by apex or lightning.

1
  • It says ojb instead of obj. Wait, that doesn't make sense either. There is no such thing as obj in Salesforce. Commented Oct 11, 2018 at 6:48

1 Answer 1

1

This will help you

Create an instance of the time class as

Time myTime = Time.newInstance(hour, minutes, seconds, milliseconds);

Also if you are targeting custom object ojb make sure use __c at end while creating its instance

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .