Notification

Welcome to the help center for Search Ads 360, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the Search Ads 360 product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

mid

Returns a substring of string starting at the start character and counting length characters. Counting starts from 1 (not 0).

Always counts in the natural direction of the advertiser’s locale. For example, if the advertiser’s language is English, this function counts from left to right.

Syntax

mid(string, start, length)

string can be any of the following:

  • A String constant, such as "GDN".
  • A Search Ads 360 variable that is a String, such as Keyword, Campaign, Engine_status, and so on.
  • An expression or formula column that returns a String.

start and length can be any of the following:

  • A positive constant, such as 5.
  • A Search Ads 360 variable that is a positive number. 
  • An expression or formula column that returns a positive number.

Examples

  • [mid("Hello World!", 4, 8)] returns "lo Wo".

  • [mid("Hello World!", 5, 0)] returns "" (empty string).

  • [mid("Hello World!", 0, 12)] is an error. Counting begins with 1, not zero.

  • [mid("every dog has its day", 1, -1)] is an error. Negative numbers are not valid.

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
1149488059985423996
true
Search Help Center
true
true
true
true
true
263
false
false