<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.datetime.dates_from_datetimes" />
<meta itemprop="path" content="Stable" />
</div>

# tf_quant_finance.datetime.dates_from_datetimes

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/datetime/date_tensor.py">View source</a>



Creates DateTensor from a sequence of Python datetime objects.

```python
tf_quant_finance.datetime.dates_from_datetimes(
    datetimes
)
```



<!-- Placeholder for "Used in" -->


#### Args:


* <b>`datetimes`</b>: Sequence of Python datetime objects.


#### Returns:

DateTensor object.


#### Example

```python
import datetime

dates = [datetime.date(2015, 4, 15), datetime.date(2017, 12, 30)]
date_tensor = tff.datetime.dates_from_datetimes(dates)
```