Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
time format changed in excel

Subject: time format changed in excel

From: Diane

Date: 20 Aug, 2013 17:44:12

Message: 1 of 4

Hello, I am trying to write time of the format HH:MM:SS.FFF (without AM or PM) to an excel file. In matlab the time appears correctly (00:00:00.000), however, when it is saved to the excel file, AM is added (00:00:00.000 AM). Any suggestions? (I am working with numerous files and wish to avoid having to do any formatting within excel.)

Subject: time format changed in excel

From: TideMan

Date: 20 Aug, 2013 20:02:38

Message: 2 of 4

On Wednesday, August 21, 2013 5:44:12 AM UTC+12, Diane wrote:
> Hello, I am trying to write time of the format HH:MM:SS.FFF (without AM or PM) to an excel file. In matlab the time appears correctly (00:00:00.000), however, when it is saved to the excel file, AM is added (00:00:00.000 AM). Any suggestions? (I am working with numerous files and wish to avoid having to do any formatting within excel.)

It's Excel trying to be clever.
Unfortunately, you have no alternative to formatting in Excel.

Subject: time format changed in excel

From: Ryan

Date: 19 Sep, 2013 05:01:07

Message: 3 of 4

What about the datestr function?
http://www.mathworks.com/help/matlab/ref/datestr.html
xtimestr = datestr(xtime,'HH:MM');

TideMan <mulgor@gmail.com> wrote in message <d1a92c8f-bd71-4145-b290-97fbd6fc26b1@googlegroups.com>...
> On Wednesday, August 21, 2013 5:44:12 AM UTC+12, Diane wrote:
> > Hello, I am trying to write time of the format HH:MM:SS.FFF (without AM or PM) to an excel file. In matlab the time appears correctly (00:00:00.000), however, when it is saved to the excel file, AM is added (00:00:00.000 AM). Any suggestions? (I am working with numerous files and wish to avoid having to do any formatting within excel.)
>
> It's Excel trying to be clever.
> Unfortunately, you have no alternative to formatting in Excel.

Subject: time format changed in excel

From: TideMan

Date: 19 Sep, 2013 10:02:53

Message: 4 of 4

On Thursday, September 19, 2013 5:01:07 PM UTC+12, Ryan wrote:
> What about the datestr function?
>
> http://www.mathworks.com/help/matlab/ref/datestr.html
>
> xtimestr = datestr(xtime,'HH:MM');
>
>
>
> TideMan <mulgor@gmail.com> wrote in message <d1a92c8f-bd71-4145-b290-97fbd6fc26b1@googlegroups.com>...
>
> > On Wednesday, August 21, 2013 5:44:12 AM UTC+12, Diane wrote:
>
> > > Hello, I am trying to write time of the format HH:MM:SS.FFF (without AM or PM) to an excel file. In matlab the time appears correctly (00:00:00.000), however, when it is saved to the excel file, AM is added (00:00:00.000 AM). Any suggestions? (I am working with numerous files and wish to avoid having to do any formatting within excel.)
>
> >
>
> > It's Excel trying to be clever.
>
> > Unfortunately, you have no alternative to formatting in Excel.

Don't top post.
It makes the thread hard to follow.
Put your reply UNDERNEATH.

Have you actually tried converting using datestr, then exporting to Excel?
Or are you just a troll?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us