There is a datetime.date()
method for converting from a datetime to a date.
To do the opposite conversion, you could use this function datetime.datetime(d.year, d.month, d.day)
More Related Contents:
- Transpose/Unzip Function (inverse of zip)?
- Should import statements always be at the top of a module?
- generating variable names on fly in python [duplicate]
- How to solve “error: Microsoft Visual C++ 14.0 or greater is required” when installing Python packages?
- Python: Bind an Unbound Method?
- Proxy with urllib2
- How does numpy.newaxis work and when to use it?
- Why do we use __init__ in Python classes?
- How do I print colored text to the terminal?
- Relative imports in Python 3
- Windows cmd encoding change causes Python crash
- Python Pandas: Check if string in one column is contained in string of another column in the same row
- Django upgrading to 1.9 error “AppRegistryNotReady: Apps aren’t loaded yet.”
- Pandas: Filtering multiple conditions
- Python argparse: default value or specified value
- Program freezing during the execution of a function in Tkinter
- What refactoring tools do you use for Python? [closed]
- How convert a jpeg image into json file in Google machine learning
- how to set “camera position” for 3d plots using python/matplotlib?
- Implement an interactive shell over ssh in Python using Paramiko?
- Python Discord.py `time.sleep()` coroutine
- Threaded Tkinter script crashes when creating the second Toplevel widget
- SQLite not saving data between uses
- Plotly/Dash display real time data in smooth animation
- upload file to my dropbox from python script
- Pandas groupby and aggregation output should include all the original columns (including the ones not aggregated on)
- Generate all subsets of size k (containing k elements) in Python
- Sparse Tensor (matrix) from a dense Tensor Tensorflow
- Under what circumstances are __rmul__ called?
- Integers from excel files become floats?