Comparison date query

Our genealogy database program.

Moderator: Nick Hunter

Post Reply
Posts: 2
Joined: Wed Jan 29, 2014 11:08 am
Location: Western Australia

Comparison date query

Post by quokkaz » Wed Jan 29, 2014 11:24 am

I have the following query which works fine:
SELECT Families.

Code: Select all

, Families.[Fathers name], Families.[Mothers name], Families.[Change date], Families.[Changed]
FROM Families
WHERE  ( Families.[Change date] < JDATE('1 jan 2003') )
Order by Families.[Change date]

I would like to change the query so I don't have to change the date.  Ideally I would like it to be say ten years ago.  I tried using Dateadd(years,-10,curdate()) and other 'googled' variations without success.

Is this possible?

Nick Hunter
Posts: 669
Joined: Sun Dec 18, 2005 9:36 am
Location: SpanSoft, Scotland

Re: Comparison date query

Post by Nick Hunter » Wed Jan 29, 2014 11:46 am


Sorry. This sort of date comparison is not possible. Dates must be converted to julian dates in the format used internally by K&KPro and only literal dates can appear inside a JDATE() function. See Kith and Kin Pro manual - SQL Syntax

Post Reply