This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
sorry, dateFormatMark works on the name, not the path, but thats a problem since you have the year in the path i will have to fix that so that it works on the path instead. is this in the critical path of something? > John, > > Actually, the problem seems to be that the "dateForematMark" is > interpreting whatever comes after the first "#" as a date, which is > different behavior than the "runDateMatcher", which is matching what > is between a pair of "#" signs. And reading the doc, I guess this > might in fact be the case: > > "A dateFormatMark is used on joinNew types to create date coordinate > values out of the filename. It consists of a section of text, a '#' > marking character, then a java.text.SimpleDateFormat string. The > number of characters before the # is skipped in the filename, then the > next part of the filename must match the SimpleDataFormat string. " > > So I tried: > dateFormatMark="c:/data/#yyyy'/his'_MMdd" > but I'm getting a "string index out of range" error. > > Grrr..... > > -Rich > > On Thu, Apr 16, 2009 at 4:37 PM, Unidata THREDDS Support > <address@hidden> wrote: > > Text can be quoted using single quotes (') to avoid interpretation. > > > > so try > > > > #/data/#yyyy'/his_'MMdd > > > > (but i didnt test it) > > SimpleDateFormat bad = /data/#yyyy'/his'_MMdd Illegal pattern character 'p' > > > > > >> John & Co, > >> > >> I'm trying to use "dataFormatMark" to match files like: > >> > >> c:/data/2009/his_0101.nc > >> c:/data/2009/his_0102.nc > >> c:/data/2009/his_0103.nc > >> > >> I've tried: > >> <aggregation dimName="runtime" > >> type="forecastModelRunCollection" recheckEvery="10min"> > >> <scan location="c:/data/" suffix=".nc" > >> dateFormatMark="#/data/#yyyy/his_MMdd" > >> subdirs="true" olderThan="5 min"/> > >> </aggregation> > >> > >> The "his" text in between the year (yyyy) and the month/day (MMdd) is > >> a problem that I don't know how to avoid. Is there a way to use ??? > >> or something to specify characters that you don't want interpreted as > >> a possible date? > >> > >> Thanks, > >> Rich > >> -- > >> Dr. Richard P. Signell (508) 457-2229 > >> USGS, 384 Woods Hole Rd. > >> Woods Hole, MA 02543-1598 > >> > >> > > > > > > Ticket Details > > =================== > > Ticket ID: ZMI-588838 > > Department: Support THREDDS > > Priority: Normal > > Status: Closed > > > > > > > > -- > Dr. Richard P. Signell (508) 457-2229 > USGS, 384 Woods Hole Rd. > Woods Hole, MA 02543-1598 > > Ticket Details =================== Ticket ID: ZMI-588838 Department: Support THREDDS Priority: Normal Status: Open