input: 
  from flask import Flask
  import datetime
  
  def create_datetime_api():
      """
      Create a web API using Flask that returns the current date and time in the format "YYYY-MM-DD HH:MM:SS".
      The API should have a route '/datetime' that, when accessed, returns the current date and time.
      >>> app = create_datetime_api()
      >>> app.test_client().get('/datetime')
      '2023-10-10 12:34:56'  # Example output, actual date and time will vary
      """
      app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
      return app
  
  if __name__ == '__main__':
      app = create_datetime_api()
      app.run()
  
output:     app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
      return app