Re: ncl-string

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 20 2011 - 21:40:06 MDT

As noted in the NCL Reference manual:
"Strings use the '+' operation to concatenate one or more strings."

    "2011" "01" "16"
    yy(nt) + mm(nt) + dd(nt)

or, if integers, use sprinti
http://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml

   yymmdd = sprinti("%0.4i", yy) + sprinti("%0.2i", mm) +
sprinti("%0.2i", dd)

On 10/20/11 9:30 PM, cnl88 wrote:
> When i put out data of time it turns out to 201116
> but i want it to be 20110106 ,how can i write the command ,thank you!
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 20 21:40:13 2011

This archive was generated by hypermail 2.1.8 : Mon Oct 24 2011 - 09:29:35 MDT