Coverting date format was: Problems with Ut_string

From: ugo merlini <ugomerlini_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 03 2011 - 13:00:46 MDT


I would like to convert the date format from the standard one to

 date -d "20111002 03 +2 hour" +"%A, %d/%m/%Y ore %H"

I write a little script

can someone help to go to the right way?

is better to use internal NCL function instead of Unix shell command?



Date: Mon, 3 Oct 2011 09:08:30 -0400
Subject: Re: Problems with Ut_string

I believe you are missing some quotes on line 304. Try this:
        date2 = systemfunc("date -d " + date + " +'%A %H'")

Previously, the date in parentheses was calling the unix command date, not your variable date. Hope this helps!
On Sun, Oct 2, 2011 at 1:37 PM, ugo merlini <> wrote:


I'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

so i made (line 304)

date2 = systemfunc("date -d '(date)' +'%A %H'")

but the result is always Sunday 00






ncl-talk mailing list

List instructions, subscriber options, unsubscribe:

Carl J. Schreck III, PhD
Postdoctoral Research Associate
Cooperative Institute for Climate and Satellites (CICS-NC)
North Carolina State University and NOAA's National Climatic Data Center
151 Patton Avenue
Asheville, NC 28801
Tel: 828-257-3140carl_at_cicsnc.org

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Mon Oct 3 13:00:54 2011

This archive was generated by hypermail 2.1.8 : Sun Oct 09 2011 - 13:05:26 MDT