<div dir="ltr"><div><div><div><div>That is a clever solution. I never would never have thought of that!<br><br></div>However, my experience is that the *nix &#39;date&#39; can be a bit finicky.<br><br></div>In my case, it works on two *nix systems but fails on my MAC (&quot;date: illegal time format&quot;)<br><br></div>I am not sure why this should happen.<br><br></div>Attached is a quick and dirty NCL  function and test that (may) be more robust<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 12:22 PM,  <span dir="ltr">&lt;<a href="mailto:jmason@eos.ubc.ca" target="_blank">jmason@eos.ubc.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml</a><br>
<br>
This works for me<br>
<br>
Date = systemfunc(&quot;date &#39;+%Y%m%d&#39; --date &#39;5 days&#39;&quot;)<br>
<br>
Jesse<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt; Dear ncl-team<br>
&gt;     I&#39;m using the ncl 6.1.2 on imac Darwin 64bit<br>
&gt;     I need to calculate the resulting date in the form YYYYMMDD<br>
&gt; (year,mounth and day)<br>
&gt;     starting from an initial date YYYYMMDD of string type and adding a<br>
&gt; certain number of day<br>
&gt;     For example func(&quot;20140928&quot; + 5 day) = &quot;20141003&quot;<br>
&gt;     Has ncl a routine that do this task?<br>
&gt;<br>
&gt;     thanks<br>
&gt; Francesco Trotta<br>
&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</div></div></blockquote></div><br></div>