<div dir="ltr">Although this is likely a minor detail in the example you posted, it appears you want things in UTC (hence the Z at the end of the timestamp). Joe&#39;s response only works if your computer defaults to UTC as its time zone. Otherwise, date -u +....... will be necessary to ensure the command works regardless of the local time setting.<div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div></div>
<br><div class="gmail_quote">On Mon, Dec 1, 2014 at 5:57 AM, Joseph Zambon <span dir="ltr">&lt;<a href="mailto:jbzambon@ncsu.edu" target="_blank">jbzambon@ncsu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Mark,</div><div><br></div><div>For your application, the date string for the UNIX command would be...</div><div><br></div><div>date +&#39;%Y-%m-%d-T%H:%M:%S&#39;</div><div><br></div><div>as in...</div><div>jbzambon@:~$ date +&#39;%Y-%m-%d-T%H:%M:%S&#39;<br>2014-12-01-T11:56:02</div><div><br></div><div>As you have been doing, use systemfunc along with that UNIX function to get the desired output...</div><div><br></div><div>ncl 6&gt; creation_date =systemfunc(&quot;date +&#39;%Y-%m-%d-T%H:%M:%S&#39;&quot;) <br>ncl 7&gt; print(creation_date)                                     <br><br><br>Variable: creation_date<br>Type: string<br>Total Size: 8 bytes<br>            1 values<br>Number of Dimensions: 1<br>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[1]<br>Coordinates: <br>(0)<span style="white-space:pre-wrap">        </span>2014-12-01-T11:57:35</div><div><br></div><div>See the man date page for more info on formatting from the date function.</div><div><a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?date" target="_blank">http://unixhelp.ed.ac.uk/CGI/man-cgi?date</a></div><div><br></div><div>-Joe</div><div><br></div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><div><font face="Arial">Joseph B. Zambon</font></div><div><span style="font-family:Arial">NC State University</span></div><div><font face="Arial">Department of Marine, Earth and Atmospheric Sciences</font></div><div><font face="Arial">Jordan 4133</font></div></div><div><font face="Arial"><a href="mailto:jbzambon@ncsu.edu" target="_blank">jbzambon@ncsu.edu</a></font></div><div><font face="Arial"><a href="http://www.joezambon.com" target="_blank">www.joezambon.com</a></font></div></div>
</div>
<div><br></div><div><br></div><br><div><div><div class="h5"><div>On Dec 1, 2014, at 6:41 AM, Mark Chan &lt;<a href="mailto:cym263@yahoo.com" target="_blank">cym263@yahoo.com</a>&gt; wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div style="background-color:rgb(255,255,255);font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:16px"><div style="font-size:15px;font-family:sans-serif"><div dir="ltr">Dear NCL users,</div><div dir="ltr"><br></div><div dir="ltr">In the below is a way to create the &quot;date&quot;. How could I make the date format as: &quot;2014-11-28-T15:50:49Z&quot;?</div><div dir="ltr"><br></div><div dir="ltr">Thanks a lot,</div><div dir="ltr">Mark</div><div dir="ltr"><br>   </div><div>========<br></div><div>fileAtt@creation_date =systemfunc(&quot;date&quot;) <br></div><div>:creation_date = &quot;Fri Nov 28 15:50:49 CET 2014&quot; ;<br></div><div><br></div></div><div><br></div></div></div></div>_______________________________________________<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></blockquote></div><br></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></div>