[gradsusr] Date format

Jennifer Adams jma at cola.iges.org
Mon Oct 10 19:49:19 EDT 2011


You can also parse the result when you 'set t' or 'set time' and  
manipulate those strings to get the date in a format you like. In a  
descriptor file, the date strings in the TDEF and EDEF entries must be  
in the documented format.
--Jennifer

On Oct 10, 2011, at 5:02 PM, Dave Allured wrote:

> It can be changed easily.  Here is some grads script that I use to
> make plot titles:
>
>    'query time'
>    datestr = subwrd (result, 3)
>
>    if (substr (datestr, 3, 1) = 'Z')
>       zptr = 3
>    else
>       zptr = 6
>    endif
>
>    timestr = substr (datestr, 1, zptr)
>    date    = substr (datestr, zptr+1, 99)
>
>    dd   = substr (date, 1, 2)
>    mmm  = substr (date, 3, 3)
>    yyyy = substr (date, 6, 4)
>
>    date2 = dd ' ' mmm ' ' yyyy
>    say date2
>
> --Dave
>
> On 10/10/2011 9:37 AM, Stefan Gofferje wrote:
>> Hi all!
>>
>> Is the date format (e.g. 6Z21OCT2011) hardcoded in GrADs or can it be
>> changed easily?
>>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111010/e6840d79/attachment-0003.html 


More information about the gradsusr mailing list