Python Arrow Module: Extract year, month and date value from current datetime using arrow module
Arrow Module: Exercise-6 with Solution
Write a Python program to extract year, month and date value from current datetime using arrow module.
import arrow a = arrow.utcnow() print("Year:") print(a.year) print("\nMonth:") print(a.month) print("\nDate:") print(a.day)
Year: 2019 Month: 6 Date: 1
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Python program to get a datetime or timestamp representation from current datetime.
Next: Write a Python program to get date and time properties from datetime function using arrow module.
What is the difficulty level of this exercise?
- New Content published on w3resource :
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework