input: 
  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()
  
  """
  This function creates a simple web API using Flask to return the current date and time when accessed via a GET request to the '/datetime' endpoint.
  
  Example:
  Accessing the endpoint 'http://127.0.0.1:5000/datetime' would return the current date and time in the format 'YYYY-MM-DD HH:MM:SS'.
  """
  
output:     
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  