The shortcode wraps something in header tags. For the shortcode to work you need to provide that something.
Your code above works fine, you just need to set $content="My header text";
prior to echoing the shortcode in your template. currently you are not wrapping anything in the header tags.
But you shouldn’t need to use a shortcode for wrapping in HTML tags- just use the html:
<h1> My header text</h1>
rather than
<?php echo do_shortcode( '[datecode]' .'My header text'. '[/datecode]' ); ?>