I have a dataset with date variables as datenums. I'd like to convert them to the new datetime datatype. Here is what I did:
ds.newdate = datetime(ds.olddate,'ConvertFrom','datenum');
This is what I get:
dsans =olddate newdate734138 [1x1 datetime]
This isn't useful. What I want is this:
ds ans = olddate newdate 734138 31-Dec-2009
There is some sort of sub-indexing going on where I have to go another level deeper to access my date variable. How do I access it directly in the dataset?
Best Answer