> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/api/api-endpoints/service/api-service-datetime.md).

# /api/service/datetime

## GET /api/service/datetime

> Get a formatted NATS date string, optionally providing a timestamp or a preferred format

```json
{"openapi":"3.0.2","info":{"title":"API Specification","version":"v1"},"tags":[{"name":"/api/service/datetime"}],"security":[{"api-key":[],"api-username":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key"}},"schemas":{"get_service_datetime":{"type":"object","properties":{"success":{"type":"boolean"}}}}},"paths":{"/api/service/datetime":{"get":{"description":"Get a formatted NATS date string, optionally providing a timestamp or a preferred format","tags":["/api/service/datetime"],"parameters":[{"name":"datetime","in":"query","schema":{"type":"string"},"required":false},{"name":"format","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"success","content":{"text/php":{"schema":{"$ref":"#/components/schemas/get_service_datetime"}},"application/json":{"schema":{"$ref":"#/components/schemas/get_service_datetime"}},"application/xml":{"schema":{"$ref":"#/components/schemas/get_service_datetime"}}}}}}}}}
```
