Convert Python time to Matlab datum
显示 更早的评论
How do I convert Python timestamp to a Matlab datenum? I am sure this is a common issue, but I could not find a Matlab function to do this easily.
采纳的回答
更多回答(1 个)
Don't convert to a datenum. Depending on how the Python timestamp represents the date and time, I suspect some of the values for the ConvertFrom parameter in the datetime function will be of use, something like:
x = 20211015;
dt = datetime(x, 'ConvertFrom', 'yyyymmdd')
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!