My datetimes do not give the right logical values
EventStartTimeEditField = "2023-07-20 09:00:02.798410112"
Event_start_time = datetime(EventStartTimeEditField,’InputFormat’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’Format’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’TimeZone’,’America/Halifax’)
find(acc_data.Time == Event_start_time)
The value of index 1793 of acc_data.Time is the following datetime: 2023-07-20 09:00:02.798410112
Despite these two values being identical, making a logical returns the wrong value for this index and the find function can not find the index at which the values are equal.
Does anyone have any ideas why this is and how to fix it?EventStartTimeEditField = "2023-07-20 09:00:02.798410112"
Event_start_time = datetime(EventStartTimeEditField,’InputFormat’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’Format’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’TimeZone’,’America/Halifax’)
find(acc_data.Time == Event_start_time)
The value of index 1793 of acc_data.Time is the following datetime: 2023-07-20 09:00:02.798410112
Despite these two values being identical, making a logical returns the wrong value for this index and the find function can not find the index at which the values are equal.
Does anyone have any ideas why this is and how to fix it? EventStartTimeEditField = "2023-07-20 09:00:02.798410112"
Event_start_time = datetime(EventStartTimeEditField,’InputFormat’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’Format’,’yyyy-MM-dd HH:mm:ss.SSSSSSSSS’,’TimeZone’,’America/Halifax’)
find(acc_data.Time == Event_start_time)
The value of index 1793 of acc_data.Time is the following datetime: 2023-07-20 09:00:02.798410112
Despite these two values being identical, making a logical returns the wrong value for this index and the find function can not find the index at which the values are equal.
Does anyone have any ideas why this is and how to fix it? logical, datetime, find MATLAB Answers — New Questions