Recent Changes - Search:

Administrators

Developers

Articles

Cookbook

edit

OQL SGN function

Developers.OQLSGN History

Hide minor edits - Show changes to markup

November 28, 2005, at 11:36 PM by Tassos Koutsovassilis -
Changed lines 1-2 from:

title OQL DATE function

to:

(:title OQL SGN function:)

Changed lines 4-13 from:
date(x)

Return a porcupine.utils.date.Date object, from an ISO6801? formatted string. Usefull for comparing dates and datetime datatypes. A sample query would be:

select id, modified from deep('/')
where modified between date('2005-06-17T00:00:00')
and date('2005-06-18T00:00:00')
order by modified desc
to:
sgn(x)

Return 1 if x is possitive, 0 if x = 0 or -1 if x is negative.

November 28, 2005, at 11:33 PM by Tassos Koutsovassilis -
Added lines 1-13:

(:title OQL DATE function:)

Syntax:

date(x)

Return a porcupine.utils.date.Date object, from an ISO6801? formatted string. Usefull for comparing dates and datetime datatypes. A sample query would be:

select id, modified from deep('/')
where modified between date('2005-06-17T00:00:00')
and date('2005-06-18T00:00:00')
order by modified desc
Page last modified on November 28, 2005, at 11:36 PM