# Remove hh:mm aa from label when given a date

**URL:** <https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299>\
**Category:** Ignition\
**Created:** [November 6, 2014, 8:07pm UTC](https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299 "2014-11-06T20:07:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [November 6, 2014, 8:07pm UTC](https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299/1 "2014-11-06T20:07:14Z")

</div>

I am pulling a date (not a datetime) from a DB and when I show that information in a label it shows in full MM/dd/yyyy hh:mm aa format. Being only a date it only shows 00:00:00 for the hh:mm:ss portion. How do I remove that from the label so that my final label shows only the MM/dd/yyyy?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 6, 2014, 8:45pm UTC](https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299/2 "2014-11-06T20:45:37Z")

</div>

If you’re binding the Text Property to a query (MySQL):

SELECT DATE\_FORMAT(now(),"%m/%d/%Y") as Date

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 6, 2014, 8:49pm UTC](https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299/3 "2014-11-06T20:49:35Z")

</div>

Option 2:

Use a custom property on your label. Then use an expression to bind to and format the custom property:

dateFormat(customProperyName,“MM/dd/yyyy”)

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [November 7, 2014, 5:43pm UTC](https://forum.inductiveautomation.com/t/remove-hh-mm-aa-from-label-when-given-a-date/9299/4 "2014-11-07T17:43:25Z")

</div>

Thanks Jordan. The second example worked great.
