Converting dates to appropriate form to train machine learning model
It depends on whether the date is the single source of features data X or if the date is a feature of X, along with other features.

If the date is the only independent variable you have time-series models, such as the autoregressive (AR), integrated (I) or moving average (MA) models. Their combination results in the ARMA or in the ARIMA models. Check this tutorial on using ARIMA with Python 

If the date is a feature among others, you can convert the original date into multiple date features. Check this thread for feature engineering with time data.