Date & Time import

9 views (last 30 days)
vivek narayanan
vivek narayanan on 17 Jun 2021
Commented: vivek narayanan on 17 Jun 2021
Hi All,
Could you help me to import date and time(yyyy-mm-dd hh:mm:ss) from the following file.....
2020-10-07T13:30:00.000 3 51.59920 -1.14028
2020-10-07T13:30:00.000 3 51.59920 -1.14028
2020-10-07T14:30:00.000 3 51.59946 -1.14015
2020-10-07T14:30:00.000 3 51.59946 -1.14015
2020-10-07T15:00:00.000 3 51.59945 -1.14009
...............................................
...............................................

Accepted Answer

Cris LaPierre
Cris LaPierre on 17 Jun 2021
data = readtable('vivekData.txt')
data = 5×4 table
Var1 Var2 Var3 Var4 _______________________ ____ ______ _______ 2020-10-07T13:30:00.000 3 51.599 -1.1403 2020-10-07T13:30:00.000 3 51.599 -1.1403 2020-10-07T14:30:00.000 3 51.599 -1.1401 2020-10-07T14:30:00.000 3 51.599 -1.1401 2020-10-07T15:00:00.000 3 51.599 -1.1401
data.Var1.Format = 'yyyy-MM-dd HH:mm:ss'
data = 5×4 table
Var1 Var2 Var3 Var4 ___________________ ____ ______ _______ 2020-10-07 13:30:00 3 51.599 -1.1403 2020-10-07 13:30:00 3 51.599 -1.1403 2020-10-07 14:30:00 3 51.599 -1.1401 2020-10-07 14:30:00 3 51.599 -1.1401 2020-10-07 15:00:00 3 51.599 -1.1401

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!