Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I get the last 18 numbers from this string

Participant ,
Sep 06, 2012 Sep 06, 2012

Hi,

I'm querying this field from a table. How can I only get the last 18 numbers:

The numbers look like this:

500000000818118

TOPICS
Getting started
519
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 06, 2012 Sep 06, 2012
LATEST

If it is always the last 18 numbers just use the Right() function.  Examples:

Right("500000000818118", 18)

or

<cfset mystring = "500000000818118">

<cfset mynewstring = Right(mystring, 18)>

or

#Right(yourquerycolumn, 18)#

etc.

Edit:

Well I just noticed that your example string is only 15 characters long.  Perhaps I mis-understood your question?

Message was edited by: Miguel-F

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources