The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 MATLAB .MAT file import for DateTime entries
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pourmousavi

Australia
2 Posts

Posted - 07/24/2017 :  02:24:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2017 SR2, b9.4.2.380
Operating System: Windows 10

Hello,
I have a bunch of variables in a .MAT file from MATLAB which I want to import into OriginLab. The import functions very good for numerical values. However, it fails to import character array of datetime. I tried string as well as cell types but they did not work. Is there anyway to fix this issue?

Thanks

ali

arstern

USA
237 Posts

Posted - 07/24/2017 :  11:41:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try to set the worksheet columns to date/time before importing the .mat file.

Select column and Right-Click. Select Properties.


Under the Column Properties dialog box. Select Format --> Select Date or Time. Under the Display tab, select Format type for dates/time.
Go to Top of Page

pourmousavi

Australia
2 Posts

Posted - 07/30/2017 :  9:16:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
@arstern
Thanks for your reply. I have a bunch of variables in the .mat file. Most of them are numeric and some are of datetime type like '2016-04-04 15:24:00.000'. The DateTime variables are 'char'.
The method you have mentioned did not work, unfortunately. I tried different variations of the Date Display in OriginLab and neither of them worked. I tried to convert 'char' to string arrays and still not chance.

quote:
Originally posted by arstern

Hi,

Please try to set the worksheet columns to date/time before importing the .mat file.

Select column and Right-Click. Select Properties.


Under the Column Properties dialog box. Select Format --> Select Date or Time. Under the Display tab, select Format type for dates/time.




ali
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000