---
title: "createFromDateMillis"
description: "Creates a [FillableData] instance from a [Long].

This function is used to wrap a long value for autofill purposes, such as a date represented in
milliseconds since the epoch."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
expect fun FillableData.Companion.createFromDateMillis(dateMillisValue: Long): FillableData?
```


Creates a `FillableData` instance from a `Long`.

This function is used to wrap a long value for autofill purposes, such as a date represented in
milliseconds since the epoch.

#### Parameters

| | |
| --- | --- |
| dateMillisValue | The long data to be used for autofill, representing a date in milliseconds since the epoch. |


#### Returns

| | |
| --- | --- |
|  | A `FillableData` object containing the long data, or `null` if the platform does not support autofill. |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual fun FillableData.Companion.createFromDateMillis(dateMillisValue: Long): FillableData?
```


Creates a `FillableData` instance from a `Long`.

This function is used to wrap a long value for autofill purposes, such as a date represented in
milliseconds since the epoch. On Android, it creates an `AutofillValue` that represents a date.

#### Parameters

| | |
| --- | --- |
| dateMillisValue | The long data to be used for autofill, representing a date in milliseconds. |


#### Returns

| | |
| --- | --- |
|  | A `FillableData` object containing the long data, or `null` if the platform version is lower than `Build.VERSION_CODES.O`. |




