필터 지우기
필터 지우기

read only numbers from mixed cells in excel

조회 수: 1 (최근 30일)
yonatan s
yonatan s 2017년 5월 13일
댓글: Star Strider 2017년 5월 13일
i want to read the following coloum:
9:28:53.321 AM
9:28:53.421 AM
9:28:53.521 AM
but without the AM. thanks

답변 (1개)

Star Strider
Star Strider 2017년 5월 13일
Read it with the ‘AM’ and ‘PM’, then use the datenum or datetime functions to make the appropriate time-of-day conversions to 24-hour time.
Please never discard useful information!
  댓글 수: 2
yonatan s
yonatan s 2017년 5월 13일
thank you, but i dont see how this functions help me. i dont care for the date. i just need those numbers in the same format.
Star Strider
Star Strider 2017년 5월 13일
You can get them in the same format by first using the ‘AM’ and ‘PM’ to be certain the times get imported and converted correctly. You can then use whatever format you want for the output. For ‘AM’ times, the hours will be unchanged, for ‘PM’ times, 1 PM will become 13, for example.
There are many possible output formats from the date and time functions. You do not need to specify ‘AM’ and ‘PM’ in the output unless you want to.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by