キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
言語を選択 翻訳バーを非表示
yanee
Level III

Combine Date Column and Time Column to "DateTime"

Hi,

 

I imported data from the .xls file. There is a "Date" column and "Time" column. I have to create a new column with Date Time Combine.

I used below formula

 

Date MDY( Month( :Date ), Day( :Date ), Year( :Date ) ) + (Hour( :Time ) * 3600 + Minute( :Time ) * 60 + Second( :Time ))

 

Some rows the output is off by roughly 1 minute but some rows are correct.

 

yanee_0-1708059795942.png

 

How Can I fixed this?

3件の返信3
jthi
Super User

Re: Combine Date Column and Time Column to "DateTime"

If your date and time columns are correctly formatted (other has just date and other just time) you should just be able to add them together without any other calculations.

-Jarmo
Thierry_S
Super User

Re: Combine Date Column and Time Column to "DateTime"

Hi,

It seems that there is an easier formula. You can simply define the DateTime column as:

 

:Date + :Time

 

Then, set the format to "m/d/y h:m:s".

This may not solve your problem since the data import from Excel may have odd behaviors, but I would give it a try.

If the problem persists, I would check that the data you imported is valid by converting your Time column to Numeric - Best format and check that the same times are coded by the same number of seconds.

Let us know if it works.

Best

TS

Thierry R. Sornasse
txnelson
Super User

Re: Combine Date Column and Time Column to "DateTime"

You should be able to just add the 2 values together

:date + :time;
Jim

おすすめの記事