How to convert the timestamp to local time

  • Software
  • How to convert the timestamp to local time
HsinJhao Chow

Posted on 02.03.2019 08:19

Hi!


I have a question.

When I export the .dxd file to .mat file,each data channel corresponds to a time channel.See the fig below:


The timestamp in Data1_time_Clamp_X channel looks like this:

737478.463937607

It should be convertible to 2019/02/22 11:08:04(maybe accurate to milliseconds level,but i'm not sure!)


I want to convert the time channel to local time,but I don't know the Encoding format of timestamp which seems different from the standard encoding format like unix timwstamp to local time,for example:1551508967s(unix timestamp)-->2019/3/2 14:42:47(Beijing timezone)


So anyone can help?

Thanks!

DEWESoft Support
Technical support
Posted on 04.03.2019 08:11

Dear Chow,


the timestamps are in excel time format. You can found the solution on the following link.


https://dewesoft.freshdesk.com/solution/articles/14000096638-representation-of-dewesoft-datetime-format-in-matlab/en


Regards

HsinJhao Chow

Posted on 04.03.2019 13:58

Thanks a lot.


By the way,there is a spelling error in the code:

t = datetime ( Data1_Time, 'ConvertfFrom', 'excel') 

it should be:

t = datetime ( Data1_Time, 'ConvertFrom', 'excel') 

ConvertfFrom --> ConvertFrom,remove 'f'.


Thanks again.

Login to reply to this topic. If you don't have account yet, you can signup for free account .