フィルターのクリア

Compare/find datevector und timevector

1 回表示 (過去 30 日間)
Timur
Timur 2023 年 7 月 24 日
コメント済み: Timur 2023 年 7 月 25 日
Hello to all,
please can you show me right way. I must update one table from another. as point i have timestamp. step is 10 min.
at the first from this format i make vector with "datevec" because {'20-Jul-2023 14:10:47'} default format. then i stack
i must find vector from second table witch not loger as 10 min. but ist hard
i am on the right way or i can use samthing else and simple.
thanks a lot for your answers.

採用された回答

Raheel Naveed
Raheel Naveed 2023 年 7 月 24 日
Hi,
You mentioned using datevec, which converts date strings to date vectors. However, to perform operations based on timestamps, I recommend you convert your dates into datetime objects.
table1.timestamp = datetime(table1.timestamp,'InputFormat','dd-MMM-yyyy HH:mm:ss'); % Assuming table1 as your first table
Let's assume table1 and table2 are your two tables and they both have a variable timestamp of datetime type.
mergedTable = innerjoin(table1, table2, 'Keys', 'timestamp');
The innerjoin function merges rows from two tables based on key variables (in this case, timestamp).
Thanks
  1 件のコメント
Timur
Timur 2023 年 7 月 25 日
Thanks for your recomendation.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series Objects についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by