MATLAB Answers

How can I delete the same chunck from a column?

1 view (last 30 days)
I am new to Matlab (coming from R). Sorry if the question is very basic.
I have a 216x8 table. The first column is a Date column which looks like this:
03-Jan-2002 00:00:00
07-Feb-2002 00:00:00
07-Mar-2002 00:00:00
04-Apr-2002 00:00:00
02-May-2002 00:00:00
%I would like to get this though while keeping all the other columns constant:
  1 Comment
Loren Shure
Loren Shure on 19 Mar 2020
Suppose your table is in the variable tbl. Try this
tbl.Date.format = "dd-MM-yyyy"

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 19 Mar 2020
For table "T" and datetime column "Var1"
T.Var1.Format = 'dd-MMM-yyyy';
Armando MAROZZI on 19 Mar 2020
This is encouraging Adam. I have to say that, even if I have been reading and trying to do some simple things on Matlab only for a day (so just at first impact), I agree with you.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!