# Displaying time from dataset

**URL:** <https://forum.wixstudio.com/t/displaying-time-from-dataset/17152>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [July 23, 2019, 12:55pm UTC](https://forum.wixstudio.com/t/displaying-time-from-dataset/17152 "2019-07-23T12:55:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arifattal](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/arifattal/32/10185_2.png) [@arifattal](https://forum.wixstudio.com/u/arifattal)\
**Post date:** [July 23, 2019, 12:55pm UTC](https://forum.wixstudio.com/t/displaying-time-from-dataset/17152/1 "2019-07-23T12:55:44Z")

</div>

Hi,  
I am trying to display time from a User Input (I’m using the Time Picker element to allow users to input a time easily). The “Time” field as you can see from the picture below. Everything works great up to this part…

 ![](https://us1.discourse-cdn.com/wix/original/3X/6/2/62a05a7547b9cbb4c97649e7601c79360bc880dc.png)

When I go to display the time from my database with a text box, it doesn’t allow me to click the “Time” field.

![](https://us1.discourse-cdn.com/wix/original/3X/0/8/08b489129009b0989655153f29f5cc75a68cd6be.png)

What can I do to solve this? any other way to display time?

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [July 23, 2019, 1:54pm UTC](https://forum.wixstudio.com/t/displaying-time-from-dataset/17152/2 "2019-07-23T13:54:08Z")

</div>

[https://www.wix.com/corvid/forum/community-discussion/displaying-time-from-database](https://www.wix.com/corvid/forum/community-discussion/displaying-time-from-database)  
[https://www.wix.com/corvid/forum/community-discussion/presenting-time-from-date-and-time-field-on-a-table](https://www.wix.com/corvid/forum/community-discussion/presenting-time-from-date-and-time-field-on-a-table)

[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Date/toLocaleTimeString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString)  
[https://www.w3schools.com/jsref/jsref\_tolocaletimestring.asp](https://www.w3schools.com/jsref/jsref_tolocaletimestring.asp)

---

<div class="post-metadata">

**Author:** ![arifattal](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/arifattal/32/10185_2.png) [@arifattal](https://forum.wixstudio.com/u/arifattal)\
**Post date:** [July 24, 2019, 8:56am UTC](https://forum.wixstudio.com/t/displaying-time-from-dataset/17152/3 "2019-07-24T08:56:26Z")

</div>

Thanks so much Givemewhisky, however I am having trouble doing using the methods suggested. Would it be possible to use a normal text field in my form while validating the users input? I would like the user to enter a time in HH:MM format (ex. 14:30). I see that there is an option to add a regex ‘pattern validation’:

![](https://us1.discourse-cdn.com/wix/original/3X/0/f/0f5e1cc32a268f9f3da6239ab9484c84850147bb.png)

Is this something I can use?
