# None of the following functions can be called with the arguments supplied

**URL:** <https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600>\
**Category:** Support\
**Created:** [December 25, 2019, 1:08pm UTC](https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600 "2019-12-25T13:08:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![otaatepe](https://avatars.discourse-cdn.com/v4/letter/o/e79b87/32.png) [@otaatepe](https://discuss.kotlinlang.org/u/otaatepe)\
**Post date:** [December 25, 2019, 1:08pm UTC](https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600/1 "2019-12-25T13:08:29Z")

</div>

Hi,

I have firebase database Sales and I want to get the results of time range. Starting at 13:00:00 (1577278800000 as milliseconds) and end at 13:30:00 ( 1577280600000 as milliseconds )

Sales  
-Lws9QiOnoc\_lc0ECoYn  
-total:  
-time: 1577278800000

> val rootRef = FirebaseDatabase.getInstance().reference

```
    val query = rootRef.child("Sales").orderByChild("time").startAt(1577295000000).endAt(1577195256918)
 

    //println("query1" +query1)
    val valueEventListener = object : ValueEventListener {
        override fun onDataChange(p0: DataSnapshot) {
            if (p0.exists()) {
                for(ds in p0.children) {
                    val timeList = arrayListOf<Long>()
                    val time = ds.child("time").getValue(Long::class.java)!!
                    timeList.add(time)
      
                }
            }
        }

        override fun onCancelled(databaseError: DatabaseError) {
            Log.d(TAG, databaseError.getMessage()) //Don't ignore errors!
        }
    }
  
    query.addListenerForSingleValueEvent(valueEventListener)

```

The thing is it is giving error when I try to run.  
here is the error :

> None of the following functions can be called with the arguments supplied:  
> @NonNull @PublicApi public open fun startAt(p0: Boolean): Query defined in com.google.firebase.database.Query  
> @NonNull @PublicApi public open fun startAt(p0: Double): Query defined in com.google.firebase.database.Query  
> @NonNull @PublicApi public open fun startAt(@Nullable p0: String?): Query defined in com.google.firebase.database.Query

startAt() taking Long as paramater and I have no idea why it is giving me this error.  
Can anyone please help me here.

---

<div class="post-metadata">

**Author:** ![nickallendev](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@nickallendev](https://discuss.kotlinlang.org/u/nickallendev)\
**Post date:** [December 25, 2019, 9:06pm UTC](https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600/2 "2019-12-25T21:06:13Z")

</div>

You are passing in an Int. Put an “L” on the end of the number literal to make it a Long.

---

<div class="post-metadata">

**Author:** ![otaatepe](https://avatars.discourse-cdn.com/v4/letter/o/e79b87/32.png) [@otaatepe](https://discuss.kotlinlang.org/u/otaatepe)\
**Post date:** [December 26, 2019, 1:01am UTC](https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600/3 "2019-12-26T01:01:26Z")

</div>

> [@otaatepe](#):
>
> 1577295000000

1577295000000 is Long value, not an Integer

---

<div class="post-metadata">

**Author:** ![rrlynx](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rrlynx](https://discuss.kotlinlang.org/u/rrlynx)\
**Post date:** [December 26, 2019, 9:02am UTC](https://discuss.kotlinlang.org/t/none-of-the-following-functions-can-be-called-with-the-arguments-supplied/15600/4 "2019-12-26T09:02:19Z")

</div>

> [@otaatepe](#):
>
> startAt() taking **Long** as paramater and I have no idea why it is giving me this error.  
> Can anyone please help me here.

Your post already contains the answer:

> [@otaatepe](#):
>
> None of the following functions can be called with the arguments supplied:  
> @NonNull @PublicApi public open fun startAt(p0: **Boolean** ): Query defined in com.google.firebase.database.Query  
> @NonNull @PublicApi public open fun startAt(p0: **Double** ): Query defined in com.google.firebase.database.Query  
> @NonNull @PublicApi public open fun startAt(@Nullable p0: **String?** ): Query defined in com.google.firebase.database.Query
