I am trying to convert NCEP 2 reanalysis dates to a matlab date format. The time-series I am using from NCEP has a starting time : time(1)= 1709328; with a reference, 'hours since 1800-1-1 00:00:0.0 (dj=datenum(1800,1,1))''. Matlab uses a different reference date which is dm=datenum(1950,1,1) when I use the date-shift (dm-dj) and try to use datestr to find the date for time(1)=1709328, it gives me datestr(time(1)-dj+dm) ans =23-Dec-4829----- which does not make sense.
When I use ---datestr(time(1)+dj-dm)
ans =24-Dec-4529---- it does not make sense too.
Can anybody help to get the exact time for datenum=1709328