<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How can I set the time in Liferay Objects</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121642780" />
  <subtitle>How can I set the time in Liferay Objects</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121642780</id>
  <updated>2026-04-05T10:38:25Z</updated>
  <dc:date>2026-04-05T10:38:25Z</dc:date>
  <entry>
    <title>RE: How can I set the time in Liferay Objects</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121647064" />
    <author>
      <name>Adrian Häussler</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121647064</id>
    <updated>2023-02-08T22:01:15Z</updated>
    <published>2023-02-08T08:50:42Z</published>
    <summary type="html">&lt;p&gt;My own findings:&lt;/p&gt;
&lt;p&gt;At this point its not possible to set the Time, there already is an
    issue: &lt;a href="https://issues.liferay.com/browse/LPS-143068"&gt;https://issues.liferay.com/browse/LPS-143068&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For not displaying the time I came up with a workaround, not sure if
  there is a better approach:&lt;br /&gt; I added following CSS to the div
  that displays the time&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;.dateDiv{ 
  width: 8ch; //8characters wide, bcs 00/00/00
  height: 1rem;
  overflow: hidden;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Greetings&lt;br /&gt;     &lt;/p&gt;</summary>
    <dc:creator>Adrian Häussler</dc:creator>
    <dc:date>2023-02-08T08:50:42Z</dc:date>
  </entry>
  <entry>
    <title>How can I set the time in Liferay Objects</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121642779" />
    <author>
      <name>Adrian Häussler</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121642779</id>
    <updated>2023-02-03T17:42:58Z</updated>
    <published>2023-02-03T10:24:40Z</published>
    <summary type="html">&lt;p&gt;Hello guys :)&lt;/p&gt;
&lt;p&gt;I'm on Liferay 7.4u55, working with objects.&lt;br /&gt; I created an
  object, added a field of type &amp;quot;date&amp;quot;, I created a form. Now
  it seems to me, that the input is of type &amp;quot;date&amp;quot;, without
  possibility to set a time. (added 2 images &lt;strong&gt;img1 &amp;amp;
  img2&lt;/strong&gt; of form-builder and 1 form container &lt;strong&gt;img3&lt;/strong&gt;)&lt;br /&gt;
  &lt;br /&gt; This date becomes a DATETIME in the database
  (&lt;strong&gt;img4&lt;/strong&gt;), with a time value of 00:00:00.000000 which
  gets displayed as 12:00 AM, which does not look nice (&lt;strong&gt;img5&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;This brings me to two questions:&lt;br /&gt; How can I set a time in my
  objects, is there a possibility?&lt;br /&gt; How can I hide the time in the frontend?&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Best Regards&lt;/strong&gt;
  &lt;br /&gt;
  &lt;strong&gt;Adrian&lt;/strong&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;strong&gt;img1 &lt;/strong&gt;(Date input with reference)&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="165"
    src="/documents/d/guest/datefieldwithref-png?imagePreview=1"
    style="margin: 0.0px;" width="400" /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;strong&gt;img2 &lt;/strong&gt;(datetime input without reference)&lt;br /&gt;
  &lt;img alt="" height="177"
    src="/documents/d/guest/datetimewithoutref-png?imagePreview=1"
    style="margin: 0.0px;" width="400" /&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;br /&gt;
  &lt;strong&gt;img3 &lt;/strong&gt;(form container without datetime possibility)&lt;br /&gt;
  &lt;img alt="" src="/documents/d/guest/formcontainer-png?imagePreview=1" /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;strong&gt;img4 &lt;/strong&gt;(database DATETIME)&lt;br /&gt;
  &lt;img alt="" src="/documents/d/guest/databasedatetime-png?imagePreview=1" /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;strong&gt;img5&lt;/strong&gt;(display with stupid &lt;strong&gt;12 AM&lt;/strong&gt; time)&lt;br /&gt;
  &lt;img alt="" src="/documents/d/guest/displayofdate-png?imagePreview=1" /&gt;
  &lt;br /&gt;  &lt;/p&gt;</summary>
    <dc:creator>Adrian Häussler</dc:creator>
    <dc:date>2023-02-03T10:24:40Z</dc:date>
  </entry>
</feed>
