How do you get the time and date in python?
Question: I am trying to get the date and time on python for a program I am writing, But
am unsure how to get them. I tried doing:

    
    
    import dateline
    import date
    

This usually works but now it just prints:

    
    
    <module 'time' (built-in)> <module 'datetime' from 'C:\\Python34\\lib\\datetime.py'>
    

How can I fix this?


Answer: Formatted time: `datetime.datetime.now().strftime('%d/%m/%Y %H:%M')`

Datetime object: `datetime.datetime.now()`

