Skip to content

hours

relationalai.semantics.std.datetime
hours(period: IntegerValue) -> Expression

Create an hours period.

  • Expression - An Expression computing the period.

Create hour periods:

>>> datetime.hours(24)
>>> datetime.hours(Flight.duration_hours)
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
        └──  Use dates and datetimes
            └──  Add or subtract time periods