hours
relationalai.semantics.std.datetime
hours(period: IntegerValue) -> ExpressionCreate an hours period.
Parameters
Section titled “Parameters”
(periodIntegerValue) - The number of hours.
Returns
Section titled “Returns”Expression- AnExpressioncomputing the period.
Examples
Section titled “Examples”Create hour periods:
>>> datetime.hours(24)>>> datetime.hours(Flight.duration_hours)Referenced By
Section titled “Referenced By”RelationalAI Documentation └── Build With RelationalAI └── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning └── Use dates and datetimes └── Add or subtract time periods