cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
%3CLINGO-SUB%20id%3D%22lingo-sub-783695%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ENeue%20Zeichenspalte%20basierend%20auf%20dem%20Datumsbereich%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783695%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHallo%20zusammen%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ENeu%20bei%20JMP%20hier.%20Ich%20habe%20eine%20Datums-%2FZeittabelle%2C%20in%20der%20ich%20eine%20bedingte%20neue%20Spalte%20erstellen%20m%C3%B6chte%2C%20die%2C%20wenn%20das%20Datum%20%26gt%3B%201.1.2024%20ist%2C%20ein%20Zeichen%20%E2%80%9ENach%E2%80%9C%20zur%C3%BCckgibt.%20Wenn%20dies%20nicht%20erf%C3%BCllt%20ist%2C%20wird%20%E2%80%9EVor%E2%80%9C%20zur%C3%BCckgegeben.%20Ich%20habe%20den%20Formeleditor%20ausprobiert%2C%20habe%20aber%20immer%20noch%20Probleme%20%E2%80%A6%20nur%20Leerzeichen%20in%20den%20Zeilen.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EDanke!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-783695%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGrundlegende%20Datenanalyse%20und%20Modellierung%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783715%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Neue%20Zeichenspalte%20basierend%20auf%20dem%20Datumsbereich%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783715%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVorausgesetzt%2C%20Ihre%20DateTime-Spalte%20ist%20eine%20numerische%20JMP%20DateTime-Spalte%2C%20funktioniert%20die%20folgende%20Formel%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20%3AEvent%20Date%20%26lt%3B%20Informat(%20%2201%2F01%2F2024%22%2C%20%22m%2Fd%2Fy%22%20)%2C%0A%09%22Before%22%2C%0A%09%22After%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Neue%20Zeichenspalte%20basierend%20auf%20dem%20Datumsbereich%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%C3%9Cber%20die%20GUI%20k%C3%B6nnen%20Sie%20%3CSTRONG%3ECustom%20Binning%3C%2FSTRONG%3E%20verwenden%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1724504187864.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1724504187864.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1724504187864.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1724504187864.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67487i0B6BCC89BBC2A85E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1724504187864.png%22%20alt%3D%22hogi_0-1724504187864.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%20und%20verwenden%20Sie%20benutzerdefinierte%20Beschriftungen%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_2-1724504339366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_2-1724504339366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_2-1724504339366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_2-1724504339366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67489i6786E5AC032E1A38%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_2-1724504339366.png%22%20alt%3D%22hogi_2-1724504339366.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_1-1724504271574.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1724504271574.png%22%20style%3D%22width%3A%20342px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1724504271574.png%22%20style%3D%22width%3A%20342px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1724504271574.png%22%20style%3D%22width%3A%20342px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67488iC0D79F98E07EF82E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_1-1724504271574.png%22%20alt%3D%22hogi_1-1724504271574.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EUm%20die%20Einstellungen%20anzupassen%2C%20verwenden%20Sie%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_3-1724504440360.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_3-1724504440360.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_3-1724504440360.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_3-1724504440360.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67490iA7B77C49A4474F33%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_3-1724504440360.png%22%20alt%3D%22hogi_3-1724504440360.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783766%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Neue%20Zeichenspalte%20basierend%20auf%20dem%20Datumsbereich%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783766%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVielen%20Dank%20euch%20beiden!%20JMP%20ist%20so%20leistungsstark%20%E2%80%A6%20Ich%20freue%20mich%20schon%20darauf%2C%20mehr%20zu%20lernen!%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ECesar%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Neue%20Zeichenspalte%20basierend%20auf%20dem%20Datumsbereich%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2687%22%20target%3D%22_blank%22%3E%40txnelson%3C%2FA%3E%20hat%20die%20Formel%20bereitgestellt.%20In%20diesem%20Fall%20m%C3%BCssen%20Sie%20die%20Funktion%20In%20Format()%20nicht%20aufrufen.%20Sie%20k%C3%B6nnen%20einen%20geeigneten%20Datumswert%20w%C3%B6rtlich%20verwenden.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20%3AEvent%20Date%20%26lt%3B%2001Jan2024%2C%0A%09%22Before%22%2C%0A%09%22After%22%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
LEARNING
Level I

New Character Column Based on Date Range

Hi Everyone,

 

New to JMP here.  I have a Date/Time table where I would like to establish a conditional new column that if the date is > 1/1/2024, then return a character of "After."  If this is not met, return "Before."  I have tried the formula editor but still having issues.....just blanks in the rows.

 

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: New Character Column Based on Date Range

Assuming your DateTime column is a numeric JMP DateTime column the below formula will work

If( :Event Date < Informat( "01/01/2024", "m/d/y" ),
	"Before",
	"After"
)
Jim

View solution in original post

hogi
Level XII

Re: New Character Column Based on Date Range

Via the GUI, you can use Custom Binning:

hogi_0-1724504187864.png
and use custom labels:

hogi_2-1724504339366.png

 

hogi_1-1724504271574.png



To adjust the settings, use

hogi_3-1724504440360.png

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: New Character Column Based on Date Range

Assuming your DateTime column is a numeric JMP DateTime column the below formula will work

If( :Event Date < Informat( "01/01/2024", "m/d/y" ),
	"Before",
	"After"
)
Jim
hogi
Level XII

Re: New Character Column Based on Date Range

Via the GUI, you can use Custom Binning:

hogi_0-1724504187864.png
and use custom labels:

hogi_2-1724504339366.png

 

hogi_1-1724504271574.png



To adjust the settings, use

hogi_3-1724504440360.png

Re: New Character Column Based on Date Range

@txnelson provided the formula. In this case, you do not need to call the In Format() function. You can use a convenient literal date value.

If( :Event Date < 01Jan2024,
	"Before",
	"After"
);
LEARNING
Level I

Re: New Character Column Based on Date Range

Thank you very much both!  There is so much power in JMP.....I am really looking forward to learning more!

 

Cesar