---
schema_version: "1"
id: b773ba4097ad1007fc2090fc38671a7754832c8cc04876f701feb2896c0d5eb4
title: LEFT
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_left.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_left.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: cbaac08f231a3be9fe29bca68d4bfdd198590e1b30e8a92765d8daa3bf699e9a
description: Returns the specified number of characters from the beginning of a text string.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# LEFT

Returns the specified number of characters from the beginning of a text string.

## Use

`LEFT(text, num_chars)` and replace text with the field or expression you want returned; replace num\_chars with the number of characters from the left you want returned.

## Tips

- Reference auto-number fields as text fields in formulas.
- If the num\_chars value is less than zero, Salesforce replaces the value with zero.

![Custom Field Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Custom Field Example

`TRIM(LEFT(LastName, 5)) & "-" & TRIM(RIGHT(SSN__c, 4))`

This formula displays the first five characters of a name and the last four characters of a social security number separated by a dash. Note that this example uses a text custom field called SSN.