フィルターのクリア

How to import Datetime Format form Database (Microsoft Access)

6 ビュー (過去 30 日間)
Jennifer Pichl
Jennifer Pichl 2018 年 3 月 15 日
回答済み: Tony Mohan Varghese 2018 年 3 月 22 日
Hello, when importing a tabel from my Database, the Datetimeformate is converted to cell array of character vectors. I conected via ODCB to my Database. Is there a way how I can import the data format correctly or how I can change it in matlab?

採用された回答

Tony Mohan Varghese
Tony Mohan Varghese 2018 年 3 月 22 日
Change the date in MATLAB, once it is imported using the datetime and readtable command.
% Code for reading the date from the input file
>> T = readtable('<filename>','Delimiter', '|');
>> T.Var3 = datetime(T.Var3,'InputFormat','yyyy-MM-dd HH:mm:ss.SSSSSSSSS','Format','dd/MMM/yyy HH:mm:ss.SSS');
Use the input format specifier to specify the format of the date strings.
Reference:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by