Ansible date Struggle

I am new to ansible .

Issue:-

I created 2 ec2 instances successfully and i am able to retrieve the launch_dates using below .

  • name: launch time and date of Ec2
    debug:
    var: item.launch_time
    with_items: “{{ ec2_facts.instances }}”.

I am using below to get ansible date and time

  • name: ansible date
    debug:
    var: ansible_date_time.iso8601_micro.date

What i am not able to do is, how do i subtract and get the difference between two date ? (item.launch_time - ansible_date_time.iso8601_micro.date) and store is to a variable or integer .

Any help is appreciated .

Regards,
NS