0

I have a unix timestamp (1.500641224636246e+09) and I am not sure how to extract whether it is AM or PM time from it via MATLAB.

1 Answers1

1

You can combine timeofday and datetime:

>> timestamp = timeofday(datetime(1.500641224636246e+09,'ConvertFrom','posixtime'));
>> isPM = timestamp > hours(12) + minutes(0) + seconds(0)
isPM =

  logical

   1
Paolo
  • 21,270
  • 6
  • 38
  • 69