# How to recognize text/string date from JSON api as date type in bubble?

**URL:** <https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233>\
**Category:** Need help\
**Created:** [August 22, 2023, 2:01pm UTC](https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233 "2023-08-22T14:01:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elias1](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@elias1](https://forum.bubble.io/u/elias1)\
**Post date:** [August 22, 2023, 2:01pm UTC](https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233/1 "2023-08-22T14:01:31Z")

</div>

HI everyone,

I need to fetch an endpoint from a third party api and I need to make their endpoint’s date be recognized by bubble.

Here is an example how the data is displayed that is recognized as text by bubble:

```
  {
        "pk": 922403148,
        "start_at": "2023-09-13T13:00:00-0700",
        "end_at": "2023-09-13T14:30:00-0700"
  }

```

As you see there are two dates as strings from this payload.

Therefore, how can I make these dates be recognized in bubble?

---

<div class="post-metadata">

**Author:** ![Panto9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/panto9/32/260375_2.png) [@Panto9](https://forum.bubble.io/u/Panto9)\
**Post date:** [August 25, 2023, 1:14am UTC](https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233/2 "2023-08-25T01:14:59Z")

</div>

When connecting APIs, immediately you initalize the call Bubble asks you to check if the data are the right data types.  
For example for your JSON, Bubble would show something similar to

PK --------------number  
start\_at --------- date  
end\_at ---------- date

If there’s an incorrect data type, you can tell Bubble what the right data type may be. For example assuming Bubble recognizes PK as text instead of Number, you will simply select the “Text” dropdown and switch it to number.

---

<div class="post-metadata">

**Author:** ![elias1](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@elias1](https://forum.bubble.io/u/elias1)\
**Post date:** [August 25, 2023, 1:20am UTC](https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233/3 "2023-08-25T01:20:54Z")

</div>

TRUE, that is right. OMG it was there all the time!! no way.  
You have no idea how many logic I have done just to get the type.

![image](https://us1.discourse-cdn.com/bubble/original/3X/7/2/72326363c675a9b8f3356a8c4b3db9b5c245d4b0.png)

Apreciated Panto9

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [October 31, 2023, 2:02pm UTC](https://forum.bubble.io/t/how-to-recognize-text-string-date-from-json-api-as-date-type-in-bubble/279233/4 "2023-10-31T14:02:25Z")

</div>

Closed on October 31, 2023, 2:02pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
