cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Mango1102
Level I

How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

Since it is not a normal number, conditional formulas cannot be used.
 
 
 
 
 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

You can for example use Format with Format Pattern

Format(:142:12:05, "Format Pattern", "<Day>")

Do note that this will return a string not a number, so you might want to convert it to number using Num().

 

Day of Year might also work but I haven't tested if it will in all the situations

Day Of Year(:142:12:05) - 1
-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

You should just be able to copy the value without any issues in JMP. For example value :142:12:05 will be pasted as 12312300 but you might have to change the format of column. You can also "convert" it to number (it basically already is already is, just formatted as duration) by using Num() function.

Show(:142:12:05, num(:142:12:05), :142:12:05 == 12312300);
// :142:12:05:00;
// Num(:142:12:05:00) = 12312300;
// :142:12:05:00 == 12312300 = 1;

Edit: Link regarding Date-Time Values from Scripting Guide Scripting Guide > Types of Data > Date-Time Functions and Formats > Date-Time Values 

-Jarmo
Mango1102
Level I

Re: How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

Thanks so much your quick response jthi.

But I want to use the conditional(If) formula by using the confirmed Duration value (Day) as it is.
However, as you said, each "Day" information has its own value, so it is difficult to use the "If" formula.
Is there any formula that i can change the confirmed value as a general number?

 

jthi
Super User

Re: How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

You can for example use Format with Format Pattern

Format(:142:12:05, "Format Pattern", "<Day>")

Do note that this will return a string not a number, so you might want to convert it to number using Num().

 

Day of Year might also work but I haven't tested if it will in all the situations

Day Of Year(:142:12:05) - 1
-Jarmo
Mango1102
Level I

Re: How do I copy only for value from the duration(day) and paste it as it is into new column.(but not time/date format)?

It's working. So appreciated.