"It seems that 'datetick' does not allow using axis-objects, ..."
>> help datetick
Still, don't use datenum any longer unless you run into a dead end that some particular specialty plot or other function doesn't work with datetime objects instead; much more flexible and the plot routines are now datetime aware and there's the datetimeruler object with it instead of the much more fickle and hard-to-use datetick.
Also, plotyy is deprecated in favor of yyplot altho there I don't fault so much; it just is a slightly different route to the same end.
So, for your case
What you will also want to do for two axes is to linkaxes the x-axes and I've found it better to turn off ticks for the second as on occasion there's been a bit of jitter and the labels/tick marks don't quite line up identically...
While the above doesn't convert to datetime until ready to plot, I'd really suggest going back to the beginning and using it throughout instead.