Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Format a datetime column to only show date

Good afternoon,
I am looking for a way to have duedate show up as a table header in every Queue (this part is already working) but I need to only show the DATE not the Date and Time. Any ideas here?
I have tried using the date() function like this date("Y-m-d", $T['duedate']) and it did work, but unfortunately it also took all the NULLS in that column and set them to 1970-01-01.
Any help here would be great.


  • Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.

  • Ubuntu Server 14.04 LTS
    PHP 5.5.9
    MySQL 5.5.54
    Staff Side

    see screenshot, need to change the output format to just be DATE, not DATETIME

    I was thinking if I could find where the function Format::datetime is declared, maybe I could create one for just Date? 

  • You can just change the Date and Time Options to display in whatever format you want.

    Admin Panel > Settings > System > Date and Time Options
  • Hello @blueyeguy
    I understand that, and I see the area you are talking about.
    The issue I am having is by default, the column is showing up as DateTime as I posted in my screenshot, I need to edit the PHP on this custom table column so it only shows up as Date.
    I was looking for an area as reference, but could not find one.
Sign In or Register to comment.