MATLAB Answers

Date and number (hour) to times

1 ビュー (過去 30 日間)
Alex
Alex 2019 年 10 月 21 日
回答済み: Ted Shultz 2019 年 10 月 21 日
I have two columns: First - Date (for example, 24-Jun-2015); Second - Hour for that Date (for example, 9, i.e., just a number of the hour). Can somebody tell me how I can convert these two pieces of information into ONE date?

  4 件のコメント

表示 1 件の古いコメント
Alex
Alex 2019 年 10 月 21 日
Pic.jpg
Stephan
Stephan 2019 年 10 月 21 日
please give us data that we can work with instead of screenshots - a .mat-file attached to a comment or your question, will help us to help you...
Alex
Alex 2019 年 10 月 21 日
Of course! Here is the file.

Sign in to comment.

回答 (1 件)

Ted Shultz
Ted Shultz 2019 年 10 月 21 日
If you convert the date column to datetime, and the hour column to a duration of hours, then you simply add them together to get a new datetime. This datetime can be converted to anything you like.

  0 件のコメント

Sign in to comment.


Translated by