-
Notifications
You must be signed in to change notification settings - Fork 35
conversion:datetime_pattern
timrdf edited this page Mar 25, 2011
·
19 revisions
See conversion:Enhancement. See also conversion:date_pattern.
Patterns are processed by Java's SimpleDateFormat.
conversion:enhance [
ov:csvCol 4;
ov:csvHeader "Completion_Date";
conversion:label "Completion_Date";
conversion:comment "";
conversion:range xsd:dateTime;
];
If you run the conversion without following Step 2 (below), you will see something like this in the stderr log:
bash-3.2$ ./convert-uk-offshore-oil-wells.sh
...
DATE FAILED: "1989-10-02" !~ 0 patterns @ :thing_2 :completion_date
...
This is telling you that the string did not match any of the zero patterns provided. So let's add some patterns!
This tells the converter how to parse the date.
conversion:enhance [
ov:csvCol 4;
ov:csvHeader "Completion_Date";
conversion:label "Completion_Date";
conversion:eg "1989-10-02";
conversion:datetime_pattern "yyyy-mm-dd";
conversion:comment "";
conversion:range xsd:dateTime;
];
What kinds of patterns have been applied (results)?:
prefix conversion: <http://purl.org/twc/vocab/conversion/>
select distinct ?datetime
where {
graph <http://purl.org/twc/vocab/conversion/ConversionProcess> {
?dataset conversion:conversion_process [
conversion:enhancement_identifier ?e;
conversion:enhance [
conversion:datetime_pattern ?datetime
]
]
}
}