ansible.builtin.to_datetime (v2.16.0) — filter

Get C(datetime) from string

| "added in version" 2.4 of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Using the input string attempt to create a matching Python C(datetime) object.

Inputs

    
_input:
    description: A string containing date time information.
    required: true
    type: str

format:
    description: C(strformat) formatted string that describes the expected format of the
      input string.
    type: str

Outputs

_value:
  description: C(datetime) object from the represented value.
  type: raw