# Date Picker: Set a specific date and Unix Date/Time Conversions

**URL:** <https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923>\
**Category:** Feature Requests\
**Created:** [June 24, 2022, 1:27pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923 "2022-06-24T13:27:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 24, 2022, 1:27pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/1 "2022-06-24T13:27:50Z")

</div>

I’m using the Date Picker which is handy but I have found 2 challenges:

1. You cannot SET the date you want when you show the calendar. I don’t want it to default to “today”. I want it to default to the date I give it.
2. Some backend DB’s use UNIX datetime values. Thunkable seems to have no way of converting between UNIX and Gregorian calendars and vice versa. I have had to invoke a web API in order to do this and this just slows things down and is not necessarily 100% reliable. ie: I need to either get a UNIX time in milliseconds since 1970 and send that to the Date Picker Calendar to show the real date, or get the user selected date from the Date Picker and send that to the DB in UNIX milliseconds. So Thunkable needs some date and time conversion options.

Please advise if and when this will be available.

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [July 6, 2022, 12:53pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/2 "2022-07-06T12:53:10Z")

</div>

Hi Thunkable  
Can you provide some feedback on this?  
Thanks

---

<div class="post-metadata">

**Author:** ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)\
**Post date:** [July 6, 2022, 4:21pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/3 "2022-07-06T16:21:14Z")

</div>

Check out this postv  
H

> [@Unix Timestamp Converter REST API v1](https://community.thunkable.com/t/unix-timestamp-converter-rest-api-v1/1832330):
>
> Unix Timestamp Converter REST API v1 [https://showcase.api.linx.twenty57.net/UnixTime/fromunixtimestamp?unixtimestamp=1549892280](https://showcase.api.linx.twenty57.net/UnixTime/fromunixtimestamp?unixtimestamp=1549892280) Currently I am working on a Weather app and I am able to get data from Open weather API. My ideas is to convert the Open weather API UNIX time to the actual datetime. Webviewer with UNIX time converter JavaScript works amazing on my Web Live preview but not on my iPhone. Then I found a UNIX TIME CONVERTER API ([http://unixtime.co.za/](http://unixtime.co.za/)), I used the same way as Open weath…

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [July 6, 2022, 5:07pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/4 "2022-07-06T17:07:16Z")

</div>

Hi Yes,  
I’m using EXACTLY that solution.  
The challenge I posted was:

1. You cannot SET the Date in the Date picker other than have it default to the current date. This is not useful if you have an existing date that the user may want to update in the date picker.
2. Yes, I am using that API but as I mentioned it would be quicker and more reliable if that functionality was native to Thunkable.

These questions go back to some old posts as well and these have never been satisfactorily addressed unfortunately.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 6, 2022, 7:51pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/5 "2022-07-06T19:51:00Z")

</div>

You do not need an API for the unix timestamp. Just use a quick HTML page that returns this JavaScript code:

`new Date(“06 Jul 2022 17:30:00 GMT”).getTime() / 1000`

You should get the unix timestamp.

If you want to get the standard date from unix timestamp then use this  
`new Date(1657125944000).toUTCString()`

Remeber, JavaScript unix timestamp is in milliseconds therefore you need to account for 1000 to be multiplied into or divided by the number given by the `seconds since 1970` block in Thunkable.

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [July 7, 2022, 2:16am UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/6 "2022-07-07T02:16:15Z")

</div>

Thanks Muneer!  
Anyone know when it will be possible to set the date up-front in the date picker to any specific value?

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [October 5, 2022, 7:53am UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/7 "2022-10-05T07:53:31Z")

</div>

What worried me, at the outset, about using a 3rd party UNIX date time converter has come to past.  
ie: It is broken and has not been working since 27 September.  
[https://showcase.api.linx.twenty57.net/UnixTime/fromunixtimestamp?unixtimestamp=1549892280](https://showcase.api.linx.twenty57.net/UnixTime/fromunixtimestamp?unixtimestamp=1549892280)  
Can anyone suggest a better replacement?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:13pm UTC](https://community.thunkable.com/t/date-picker-set-a-specific-date-and-unix-date-time-conversions/1938923/8 "2024-11-08T13:13:08Z")

</div>


