input: Write a function to create a web API with Python and Flask that provides the current date and time when accessed. If the user accesses the endpoint '/datetime', the function should return the current date and time in the format 'YYYY-MM-DD HH:MM:SS'.
  assert get_datetime()=="2023-10-05 14:30:45"
  assert get_datetime()=="2023-11-15 09:22:00"
  assert get_datetime()=="2024-01-01 00:00:00"
output: 
  from flask import Flask, jsonify
  from datetime import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      now = datetime.now()
      return now.strftime('%Y-%m-%d %H:%M:%S')
  