Free Salesforce Developers Tutorials >

Chapter 3 - Apex Datatypes and Operators >

Time and DateTime Datatypes in APEX

Time and DateTime Datatypes in APEX

What You’ll Learn


What is Time and DateTime datatype in Salesforce? What is Time and DateTime datatype in Salesforce?

Syntax of using Time and DateTime datatype in ApexSyntax of using Time and DateTime datatype in Apex

S2 Labs

What Is Time Datatype?

A value that indicates a particular time. Time values must always be created with a system static method. Time datatype stores time (hours, minutes, seconds, milliseconds).

Syntax Of Time Datatype

 Time t = Time.newInstance(12,5,2,7);

What Is DateTime Datatype?

A value that indicates a particular date and time.

Syntax Of DateTime Datatype

DateTime dt = DateTime.newInstance(1997,1,31,7,8,16);
salesforce-developer

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *