Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
mutiple reading and writing of date and time
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
My data is as follows:
 OriginTime  Year  Month  Day  Hour  Minute  Second
51.65086761  2014  6  10  12  9  5.991625
53.03222393  2014  6  10  12  9  5.991625
52.47999444  2014  6  10  12  9  5.991625
52.55764572  2014  6  10  12  9  5.991625
52.73042468  2014  6  10  12  9  5.991625
53.68612011  2014  6  10  12  9  5.991625
53.51039291  2014  6  10  12  9  5.991625
52.5239488  2014  6  10  12  9  5.991625
52.41107716  2014  6  10  12  9  5.991625
52.69466268  2014  6  10  12  9  5.991625
Here I want to 1st merge 'Hour','minute' and 'Second' column as hh:mm:ss and then add those time with the OriginTime column data I also want to merge 'Year','month' and 'Day' column data into mm/dd/yyyy. Can anyone tell me in what way should I use datestr or datevec to get the output something like
Origin Date (Local)  Origin Time (Local)
0 comentarios
Respuestas (1)
  Supreeth Subbaraya
    
 el 6 de Ag. de 2014
         To obtain an output like you mentioned, you can use the following code.
DateVector = [Year Month Day Hour Minute Second]
formatOut = 'mm/dd/yyyy HH:MM:SS.FFF'
datestr(DateVector,formatOut)
2 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

