Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8432391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:06:51+00:00 2026-06-10T06:06:51+00:00

Apologies if this has been asked before but it seems an obvious question for

  • 0

Apologies if this has been asked before but it seems an obvious question for which I can’t seem to get a working solution. I’ve loaded some data into Fuseki which contains statements comprising xsd:date information. I have written a query to extract these dates and I would like to find the duration (in days) between two specific date. A cut down query is shown below.

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX abc: <http://www.acme.com/ABC/1.0/abc-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?entry
(date1 - date2) AS ?interval)
WHERE
{
    # Not the real query but you get the idea
    ?entry a abc:thing ;
        abc:abcDateType1 ?date1 ;
        abc:abcDateType2 ?date2 .
} 

?interval is calculated correctly and seems to be in the form of an xsd:duration data type, my question is how do I extract the number of days it contains? Alternatively is there a better (standard) way of doing this.

Thank you for reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:06:53+00:00Added an answer on June 10, 2026 at 6:06 am

    You will need to work with the lexical for of the XSD duration. It is likely to be for the form “PD….”

    The answer should be call fn:days-from-duration, or a keyword for that function, but that isn’t in the standard distribution at the moment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My apologies if this question has been asked before. I can see there are
(Apologies if this has been asked before - I can't believe it hasn't, but
First off, apologies if this question has been asked before but I couldn't find
Apologies if this question has been asked before. I'm hoping that someone can step
It feels like this question has been asked before, but no questions seem to
I apologise if this has been asked before but I can't find the info
Apologies if this is too ignorant a question or has been asked before. A
First off, I apologize if this has been asked before. I can't seem to
Apologies if this has been asked before (I couldn't find the answer anywhere), but
Apologies if this question has been asked before, I couldn't find anything similar. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.