| | Description | Example |
| Blob | Binary data stored as a single object. |
Blob myBlob = Blob.valueof('idea');
|
| Boolean | Value that can only be assigned true, false, or null |
|
| Date | Particular day |
Date myDate = date.today();
Date weekStart = myDate.toStartofWeek();
|
| Datetime | Particular day and time |
Datetime myDateTime = datetime.now();
datetime newd = myDateTime.addMonths(2);
|
| Decimal | Number that includes a decimal point. Decimal is an arbitrary precision number. |
Decimal myDecimal = 12.4567;
Decimal divDec = myDecimal.divide
(7, 2, System.RoundingMode.UP);
system.assertEquals(divDec, 1.78);
|
| Double | 64-bit number that includes a decimal point. Minimum value -263. Maximum value of 263-1 |
|
| ID | 18-character Force.com record identifier |
ID id='00300000003T2PGAA0';
|
| Integer | 32-bit number that does not include a decimal point. Minimum value -2,147,483,648 -- maximum value of 2,147,483,647 |
|
| Long | 64-bit number that does not include a decimal point. Minimum value of -263 -- maximum value of 263-1. |
|
| String | Set of characters surrounded by single quotes |
String s = 'repeating memes';
|
| Time | Particular time |
Time myTime = Time.newInstance(18, 30, 2, 20);
Integer myMinutes = myTime.minute();
|
0 comments:
Post a Comment