input: Write a function to create a web API using Flask that provides the current date and time when accessed through the '/datetime' endpoint. The function should return the 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-10-05 15:45:00"
  assert get_datetime()=="2023-10-05 12:15:30"
output: 
  from flask import Flask
  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")
  