cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-266468%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EFormel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266468%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHALLO%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWie%20entferne%20ich%20%E2%80%9EDo%E2%80%9C%20aus%20der%20alphanumerischen%20Zeichenfolge%20%E2%80%9EDo%2001.02.2020%2022%3A42%20Uhr%E2%80%9C%2C%20indem%20ich%20Formeln%20verwende%20und%20sie%20einer%20Spalte%20zuweise%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIch%20habe%20versucht%2C%20die%20folgenden%20Formeln%20zu%20verwenden%2C%20aber%20es%20funktioniert%20nicht.%20Was%20mache%20ich%20falsch%3F%3C%2FP%3E%3CP%3E1%20links%3C%2FP%3E%3CP%3E2.%20richtig%3C%2FP%3E%3CP%3E3.%20Wort%3C%2FP%3E%3CP%3E4.%20Unterstr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266545%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Formel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266545%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20habe%20eine%20neue%20Spalte%20erstellt%20und%20diese%20Formel%20darin%20platziert.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ESubstr(%3APreparation%20date%2C%205)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eund%20es%20hat%20ohne%20Probleme%20funktioniert.Siehe%20meine%20angeh%C3%A4ngte%20Datei%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266544%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Formel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266544%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EDanke.%20Im%20Anhang%20finden%20Sie%20die%20Testdatendatei%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266542%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Formel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266542%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EF%C3%BCgen%20Sie%20bitte%20eine%20Beispieldatentabelle%20bei%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266485%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Formel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266485%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIhr%20Vorschlag%20funktioniert%20gut%20f%C3%BCr%20andere%20Zeichenspalten%20in%20der%20Tabelle%2C%20ABER%20nicht%20f%C3%BCr%20die%20Spalte%20mit%20einem%20bestimmten%20Format%2C%20d.%20h.%3C%2FP%3E%3CPRE%20class%3D%22language-jsl%22%3E%3CCODE%3Ea%3D%22Thu%2001%2F02%2F2020%2010%3A42%20PM%22%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIch%20habe%20auch%20die%20Spalteneigenschaften%20%C3%BCberpr%C3%BCft%20und%20verifiziert%2C%20um%20sicherzustellen%2C%20dass%20es%20sich%20um%20eine%20%E2%80%9EZeichen%E2%80%9C-Spalte%20handelt.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266476%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Formel%20zum%20Entfernen%20der%20ersten%20drei%20Zeichen%20aus%20einer%20alphanumerischen%20Zeichenfolge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266476%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EWenn%20es%20sich%20bei%20der%20Spalte%2C%20aus%20der%20Sie%20lesen%2C%20tats%C3%A4chlich%20um%20eine%20Zeichenspalte%20und%20nicht%20um%20eine%20numerische%20Spalte%20mit%20einem%20darauf%20angewendeten%20Format%20handelt%2C%20m%C3%B6chten%20Sie%20die%20Teilzeichenfolge%20verwenden.Stellen%20Sie%20sicher%2C%20dass%20es%20sich%20bei%20der%20Spalte%20um%20eine%20Zeichenspalte%20handelt.%20und%20wenn%20ja%2C%20wird%20das%20Folgende%20funktionieren%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ea%3D%22Thu%2001%2F02%2F2020%2010%3A42%20PM%22%3B%0A%0Ab%3Dsubstr(a%2C5)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EDie%20Formelversion%20des%20obigen%20Codes%2C%20wenn%20die%20urspr%C3%BCngliche%20Spalte%20%E2%80%9EMyColumn%E2%80%9C%20hei%C3%9Ft.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Esubstr(%3AMyColumn%2C5)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EWenn%20nicht%2C%20m%C3%BCssen%20Sie%20nur%20das%20Format%20der%20Spalte%20%C3%A4ndern%3C%2FP%3E%0A%3CPRE%3E%26nbsp%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
tajrida
Level III

Formula to remove first three characters from a alpha-numeric string

HI,

 

How do I remove "Thu" from the alphanumeric string "Thu 01/02/2020 10:42 PM" using and assigning a formulae, to a column.

 

I tried using below formulas and it doesn't work. what am I doing wrong?

1. left

2. right

3. word

4. substr

Mohammed Ahmed
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Formula to remove first three characters from a alpha-numeric string

I created a new column and placed this formula in it.

Substr(:Preparation date, 5)

and it worked without issue.  See my attached file

 

Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Formula to remove first three characters from a alpha-numeric string

If the column you are reading from is actually a character column, and not a numeric column with a format applied to it, then the substring is what you want to use.  Make sure the column is a character column. and if so, the below will work

a="Thu 01/02/2020 10:42 PM";

b=substr(a,5);

The formula version of the above code if the original column is called "MyColumn"

substr(:MyColumn,5);

If not then you just need to change the format for the column

 

 

Jim
tajrida
Level III

Re: Formula to remove first three characters from a alpha-numeric string

Your suggestion is working fine for other character columns in the table BUT not for the column with specific format i.e., 

a="Thu 01/02/2020 10:42 PM";

I also checked and verified column properties to ensure it is a "character" column. 

 

Mohammed Ahmed
txnelson
Super User

Re: Formula to remove first three characters from a alpha-numeric string

attach a sample data table please

Jim
tajrida
Level III

Re: Formula to remove first three characters from a alpha-numeric string

Thanks. Attached here is the test data file

Mohammed Ahmed
txnelson
Super User

Re: Formula to remove first three characters from a alpha-numeric string

I created a new column and placed this formula in it.

Substr(:Preparation date, 5)

and it worked without issue.  See my attached file

 

Jim

Recommended Articles