The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: format for reading 'yyyymmddTHHMMSS'
Replies: 3   Last Post: Nov 18, 2012 10:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: format for reading 'yyyymmddTHHMMSS'
Posted: Nov 17, 2012 12:36 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 11/17/2012 10:41 AM, Arun Upadhayaya wrote:

> I have to read and print as output datetime format 'yyyymmddTHHMMSS' to
> a file. Suggest me what format i can use for the same .
> datestr converts the format but i need to just display and existing date
> time from file 1998-12-24T03:48:05.698.

I can't parse from the post precisely which form it is you have--text or
datenum but since if it were already text it would seem your problem
would be solved I'll presume you have a datenum something like

>> dn=datenum(1998,12,24,3,48,5.698);
>> sprintf('%4d-%2.2d-%2.2dT%2.2d:%2.2d:%06.3f',datevec(dn))

ans =

doc sprintf % and friends for formatting


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.