swat.cas.utils.datetime.python2sas_date

swat.cas.utils.datetime.python2sas_date(pydt)

Convert a Python date to a SAS date

Parameters
pydtdatetime.date

Python date.

Returns
float

SAS date

Examples

>>> python2sas_date(datetime.datetime(1970, 1, 1, 12, 0))
3653.0