Reputation: 305
Is there any way to convert the date which is a string(in the source) into a xsd:date(in the target) .
SourceXML :
<?xml version="1.0" encoding="UTF-8"?>
<root>
<endDate>2016-07-08T02:05:58.058Z</endDate>
</root>
Expected targetXML :
<?xml version="1.0" encoding="UTF-8"?>
<return>
<date>2016-07-08+05:58</date>
</return>
In source it is string, where the target expect this as xsd:date. suggestions please.
Upvotes: 0
Views: 124
Reputation: 117165
IMHO, you could use simply:
substring-before(endDate, 'T')
to extract the date portion of the given dateTime.
Upvotes: 1