# Dropdown List Format

**URL:** <https://forum.inductiveautomation.com/t/dropdown-list-format/6041>\
**Category:** General Discussion\
**Created:** [March 16, 2013, 2:05am UTC](https://forum.inductiveautomation.com/t/dropdown-list-format/6041 "2013-03-16T02:05:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcs226](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@lcs226](https://forum.inductiveautomation.com/u/lcs226)\
**Post date:** [March 16, 2013, 2:05am UTC](https://forum.inductiveautomation.com/t/dropdown-list-format/6041/1 "2013-03-16T02:05:43Z")

</div>

I am using a dropdown list that is populated by a date/time column from a table.  
“SELECT DISTINCT Shipment\_Date for Holds”  
Returns a list in the following format ‘2013-01-01 00:00:00’

I only want to display ‘2013-01-01’ in list drop down list.

I have not been able to figure a way to format the selected date or the dates displayed in the list.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [March 18, 2013, 9:05am UTC](https://forum.inductiveautomation.com/t/dropdown-list-format/6041/2 "2013-03-18T09:05:48Z")

</div>

If you’re using MySQL use the DATE\_FORMAT() function:`SELECT DISTINCT DATE_FORMAT(Shipment_Date, '%Y-%m-%d') AS Date from Holds`You can find out more [here](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format).
