How to get only a date when user enter just a date part in DateTimeField

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    Hi  ,

    A dateTimefield is used for choosing a date and a time while a datefield is just for the date. Not sure what's your requirement but I would make that dateTimefield required forcing the user to enter a date and time or change that field to a datefield and update your ri!'s to type "Date". Since your ri!'s are of type "Date and Time", there's no possible way that you can save a value of type "date" into an ri! of type "Date and Time". That ri! will always return "Date and Time".

Reply
  • +1
    Certified Lead Developer

    Hi  ,

    A dateTimefield is used for choosing a date and a time while a datefield is just for the date. Not sure what's your requirement but I would make that dateTimefield required forcing the user to enter a date and time or change that field to a datefield and update your ri!'s to type "Date". Since your ri!'s are of type "Date and Time", there's no possible way that you can save a value of type "date" into an ri! of type "Date and Time". That ri! will always return "Date and Time".

Children
No Data