Skip to content

Can't seem to compare DateTime  #323

@Thraka

Description

@Thraka

This code throws an exception:

lastUpdate = DateTime.Now

if (lastUpdate < DateTime.Now):
    pass

The error is

TypeError: unorderable types: DateTime() < DateTime()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions