Definition of Time
Show older comments
I have a file data with:
Column1: Year (2011)
Column2: Month (10)
Column3: Day (22)
Column4: Hour (10)
Column5: Minute (35)
Column6: Second (30)
These are "86400x1 double" so a lot of data.
I want to have a variable or another cell with TIME like:
YYYY.MM.DD HH.MM.SS (2011.10.22 10.35.30)
How could I concatenate or merge all elements?
I need to use it after that to find the DATE and TIME (X) in the database and to delete until the next (Y) value TIME. At the end I have to plot all and have an average of temperatures (The data has also some columns with temperatures)
Thank you
3 Comments
Jan
on 7 Mar 2012
I do not understand the input format. What is "these" in "these are 86400x1"? How does the file look like and what means "*another* cell"? And what exactly means "YYYY.MM.DD HH.MM.SS (2011.10.22 10.35.30)"? Do you want the 'YYYY...' string appear in the variable? And the parenthesis?
I suggest to use one of the standard date formats, see "help datestr".
Liviu
on 7 Mar 2012
Liviu
on 7 Mar 2012
Accepted Answer
More Answers (1)
Liviu
on 8 Mar 2012
0 votes
3 Comments
Jan
on 8 Mar 2012
Please format your code as explained in the "Markup help" link on this page.
There is no reason to remove all loaded functions from the memory using "clear all". It takes a lot of time to re-import the M-files afterwards. Perhaps you want "clear variables", but even this is useless here.
Dr. Seis
on 8 Mar 2012
At what point do you assign the data to "data"?
Liviu
on 9 Mar 2012
Categories
Find more on Dates and Time 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!