Mar-31-2017, 10:38 AM
Formula that you are using is based on assumption that matlab datenum is representing days from Jan 1, 0 with fractional part representing part of day.
It seems that your datenum is probably number of seconds from Jan 1, 0 (while fractional part is mysterious). If its really seconds from some date, you can use
It seems that your datenum is probably number of seconds from Jan 1, 0 (while fractional part is mysterious). If its really seconds from some date, you can use
datetime.datetime.fromtimestamp()
, it uses seconds from Jan 1, 1970, so you would need to subract your "matlab datenum" for Jan 1, 1970 to get seconds from Jan 1, 1970.