from datetime import datetime


def get_date_as_numeric(date):
    """Takes the date as a string and returns it as a float
    The input date is converted to seconds for comparison with other dates

    Args:
        date (str): the date as a string "%Y-%m-%d %H:%M:%S.%f",
        eg "2018-03-09 11:00:36.372339"

    Returns:
        float: time in seconds
    """

    # Expression to match
    expression = "%Y-%m-%d %H:%M:%S.%f"

    # Convert date to seconds
    seconds = datetime.strptime(date, expression).timestamp()

    return seconds