Skip to main content

date_parse

The date function used to parse a date or datetime value, according to a given format string. A wide variety of parsing options are available. The full set of formatting characters supported and sample format strings can be found here.

Returns: datetimestamp

Table 1.

Parameter

Type

Description

stringValue

string

the string from which to parse date information

formatString

string

the format string



Example

Query

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-function-sample-queries/>
PREFIX fn: <http://data.world/function/functions#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT (fn:date_parse("20010101", "yyyyMMdd") as ?date_parse)
{
}

Try the query

Table 2. Results

date_parse

2001-01-01T00:00:00.000Z