How to query age based on birth date

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to query age based on birth date

Semantic Mediawiki - User mailing list

Good day to the forum:
 
I am using:
MediaWiki: 1.28.2 | SMW: 2.5.2 | Semantic Result Format: 2.4.2
 
I have the following properties;
ArticleName – Name of the article and the character
ArticleDate – Date of the present article
CharBirth – Birthdate of the character
 
I have the following articles:
==James Kirk==
{{#set:
|ArticleDate={{REVISIONTIMESTAMP}}
|ArticleName=James Kirk
|CharBirth=2223/03/22
}}
 
==Spock==
{{#set:
|ArticleDate={{REVISIONTIMESTAMP}}
|ArticleName=Spock
|CharBirth=2230/01/06
}}
 
==Star Trek Ages==
{{#set:
|ArticleDate=2283/01/01
}}
Today, Mr. Spock is QUERY years old.
 
Mr. Spock is QUERY years older than James Kirk.
 
In this third article, how can I query for the current ageof Mr. Spock and query for the age difference between Mr. Spock and James Kirk?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user