I think you are still missing some pluses. Try this:<div><div><span style="white-space:pre-wrap">        </span>date2 = &quot;date -d &quot; + date1 + &quot; +&#39;%A, %d/%m/%Y ore %H&#39;&quot;</div><div>(also attached). Also note the single quotes around the format statement.</div>


<div><br></div><div>ut_string can do something very similar, but as of now it can&#39;t add the day of the week. I&#39;ll put that on my todo list....</div><div><br></div><div>   Carl</div><div><br><div class="gmail_quote">


On Mon, Oct 3, 2011 at 3:00 PM, ugo merlini <span dir="ltr">&lt;<a href="mailto:ugomerlini@hotmail.com" target="_blank">ugomerlini@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div><div dir="ltr">
Hi <br><br>I would like to convert the date format from the standard one to <br><br> date -d &quot;20111002 03 +2 hour&quot; +&quot;%A, %d/%m/%Y ore %H&quot;<br><br>I write a little script<br><br>can someone help to go to the right way?<br>


<br>is better to use internal NCL function instead of Unix shell command?<br><br>Regards<br><br>Ugo<br><br><br><br><div><hr>From: <a href="mailto:carl@cicsnc.org" target="_blank">carl@cicsnc.org</a><br>Date: Mon, 3 Oct 2011 09:08:30 -0400<br>


Subject: Re: [ncl-talk] Problems with Ut_string<br>To: <a href="mailto:ugomerlini@hotmail.com" target="_blank">ugomerlini@hotmail.com</a><br>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>


<br>I believe you are missing some quotes on line 304. Try this:<div><br></div><div><div><span style="white-space:pre-wrap">        </span>date2 = systemfunc(&quot;date -d &quot; + date + &quot; +&#39;%A %H&#39;&quot;)</div>

<div><br></div><div>Previously, the date in parentheses was calling the unix command date, not your variable date. Hope this helps!</div><div><br></div><div>    Carl</div><br><div>On Sun, Oct 2, 2011 at 1:37 PM, ugo merlini <span dir="ltr">&lt;<a href="mailto:ugomerlini@hotmail.com" target="_blank">ugomerlini@hotmail.com</a>&gt;</span> wrote:<br>




<blockquote style="border-left:1px solid rgb(204, 204, 204);padding-left:1ex">



<div><div dir="ltr">
hi,<br><br>I&#39;m trying to make a custom date format so I extract gfs timestamp and put it in a format readable from linux shel comand (lines 300 and 301) and I obtain the right format YYYYMMDD HH (line 304) as bah command line want<br>




<br>so i made (line 304)<br><br>date2 = systemfunc(&quot;date -d &#39;(date)&#39; +&#39;%A %H&#39;&quot;)<br><br>but the result is always Sunday 00<br><br>Why?<br><br>Regards<br><font color="#888888"><br>Ugo<br><br><br><br>




                                               </font></div></div>
<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>
<br></blockquote></div><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Carl J. Schreck III, PhD<br>Postdoctoral Research Associate<br>Cooperative Institute for Climate and Satellites (CICS-NC)<br>North Carolina State University and NOAA&#39;s National Climatic Data Center<br>




151 Patton Avenue<br>Asheville, NC 28801<br>Tel: <a href="tel:828-257-3140" value="+18282573140" target="_blank">828-257-3140</a></div><div><a href="mailto:carl@cicsnc.org" target="_blank">carl@cicsnc.org</a></div><div><a href="http://monitor.cicsnc.org/mjo/" target="_blank">http://monitor.cicsnc.org/mjo/</a></div>




<div><div><div><a href="http://www.atmos.albany.edu/student/carl/" target="_blank">http://www.atmos.albany.edu/student/carl/</a></div></div></div><br>
</font></div></div>                                               </div></div>
<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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Carl J. Schreck III, PhD<br>Postdoctoral Research Associate<br>Cooperative Institute for Climate and Satellites (CICS-NC)<br>North Carolina State University and NOAA&#39;s National Climatic Data Center<br>


151 Patton Avenue<br>Asheville, NC 28801<br>Tel: <a href="tel:828-257-3140" value="+18282573140" target="_blank">828-257-3140</a></div><div><a href="mailto:carl@cicsnc.org" target="_blank">carl@cicsnc.org</a></div><div><a href="http://monitor.cicsnc.org/mjo/" target="_blank">http://monitor.cicsnc.org/mjo/</a></div>


<div><div><div><a href="http://www.atmos.albany.edu/student/carl/" target="_blank">http://www.atmos.albany.edu/student/carl/</a></div></div></div><br>
</div></div>