<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><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 +'%Y-%m-%d-T%H:%M:%S'</div><div><br></div><div>as in...</div><div>jbzambon@:~$ date +'%Y-%m-%d-T%H:%M:%S'<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("date +'%Y-%m-%d-T%H:%M:%S'")&nbsp;<br>ncl 7&gt; print(creation_date)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br><br><br>Variable: creation_date<br>Type: string<br>Total Size: 8 bytes<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;1 values<br>Number of Dimensions: 1<br>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[1]<br>Coordinates:&nbsp;<br>(0)<span class="Apple-tab-span" style="white-space:pre">        </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">http://unixhelp.ed.ac.uk/CGI/man-cgi?date</a></div><div><br></div><div>-Joe</div><div><br></div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div style="orphans: 2; widows: 2;"><font class="Apple-style-span" face="Arial">Joseph B. Zambon</font></div><div style="orphans: 2; widows: 2;"><span style="font-family: Arial;">NC State University</span></div><div style="orphans: 2; widows: 2;"><font class="Apple-style-span" face="Arial">Department of Marine, Earth and Atmospheric Sciences</font></div><div style="orphans: 2; widows: 2;"><font class="Apple-style-span" face="Arial">Jordan 4133</font></div></div><div style="orphans: 2; widows: 2;"><font class="Apple-style-span" face="Arial"><a href="mailto:jbzambon@ncsu.edu">jbzambon@ncsu.edu</a></font></div><div style="orphans: 2; widows: 2;"><font class="Apple-style-span" face="Arial"><a href="http://www.joezambon.com">www.joezambon.com</a></font></div></div>
</div>
<div><br></div><div><br></div><br><div><div>On Dec 1, 2014, at 6:41 AM, Mark Chan &lt;<a href="mailto:cym263@yahoo.com">cym263@yahoo.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><div id="yui_3_16_0_1_1417433629984_6629" class="" data-canvas-width="54.012" data-angle="0" data-font-name="g_font_1" style="; left: 562.23px; top: 301.311px; font-size: 15px; font-family: sans-serif; transform: rotate(0deg) scale(1.03869, 1); transform-origin: 0% 0% 0px;"><div dir="ltr" id="yui_3_16_0_1_1417433629984_6706">Dear NCL users,</div><div dir="ltr" id="yui_3_16_0_1_1417433629984_6717"><br></div><div id="yui_3_16_0_1_1417433629984_6766" dir="ltr">In the below is a way to create the "date". How could I make the date format as: "2014-11-28-T15:50:49Z"?</div><div id="yui_3_16_0_1_1417433629984_7035" dir="ltr"><br></div><div id="yui_3_16_0_1_1417433629984_7036" dir="ltr">Thanks a lot,</div><div id="yui_3_16_0_1_1417433629984_7037" dir="ltr">Mark</div><div id="yui_3_16_0_1_1417433629984_7038" dir="ltr"><br>   </div><div id="yui_3_16_0_1_1417433629984_6707">========<br></div><div id="yui_3_16_0_1_1417433629984_6708">fileAtt@creation_date =systemfunc("date") <br></div><div id="yui_3_16_0_1_1417433629984_6713">:creation_date = "Fri Nov 28 15:50:49 CET 2014" ;<br></div><div style="" class="" id="yui_3_16_0_1_1417433629984_6713"><br style="" class=""></div></div><div style="" class="" id="yui_3_16_0_1_1417433629984_6617"><br style="" class=""></div></div>_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></blockquote></div><br></body></html>