input: Write a function to create a web API using Flask in Python that returns the current date and time in the format YYYY-MM-DD HH:MM:SS when accessed at the /datetime endpoint. Ensure the function installs the necessary libraries and sets up the Flask server. If the function is executed, it should start the Flask server.
  
  assert create_web_api_datetime() == None
  
  
  from flask import Flask
  import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
  if __name__ == '__main__':
      app.run()
  
output: 
  from flask import Flask
  import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
  if __name__ == '__main__':
      app.run()
  