Date/Time field Not showing correct Time

  • 0
  • 1
  • Question
  • Updated 6 years ago
  • Answered
My Date/Time field is showiing default times like 12.00am, 4.00pm and 7.00pm whenever user enters a date. Why is that, why is it not showing the actual time when the user enters the date?
Photo of Azh7

Azh7

  • 30 Points

Posted 6 years ago

  • 0
  • 1
Photo of Mark_Shnier

Mark_Shnier

  • 590 Points 500 badge 2x thumb
A Date Time field expects to have a date entered and a time entered. for example

Feb 27, 2013 8:30am



If you want users to enter the date and the time, I suggest giving them two input fields - one for the date and one for the time, and then take their input and put it together to make a date time formula field.



ToTimestamp([my date field], [ my time field])



If you want to have the current time fill in automatically, thats a different question. Please post back if that is your question.
Photo of Azh7

Azh7

  • 30 Points
Thanks for the reply Mark.

When the user selects the date, I want the current time filled in along with the date.
Photo of Mark_Shnier

Mark_Shnier

  • 590 Points 500 badge 2x thumb
I would suggest using form rules.  You could have a checkbox field and then have a form rule that says when the checkbox is checked change the value of your date/time field to "the current date/time".

Of if the date you a entering is not today, and you want to have separate date and time entry fields, you can make a formula time of day field called Current Time with the formula

ToTimeOfDay (now())

And then have a form rule that says
When my date field is not (blank) change my time of day field to "the value in the field - Current Time"

In both cases on the form rule set the checkbox to only fire when e condition becomes true.